atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashutosh Mestry <ames...@hortonworks.com>
Subject Re: Review Request 60204: Added Additional Validation to AtlasFloatType & AtlasDoubleType
Date Tue, 20 Jun 2017 14:43:56 GMT


> On June 20, 2017, 7:33 a.m., Sarath Subramanian wrote:
> >

Tests for built-in types exist. I just didn't find them. I will add my unit tests to those.
Also I found flaw in my logic, I need to re-work it.

Please don't review, until I upload a new patch.


- Ashutosh


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60204/#review178352
-----------------------------------------------------------


On June 19, 2017, 7:41 p.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60204/
> -----------------------------------------------------------
> 
> (Updated June 19, 2017, 7:41 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-1876
>     https://issues.apache.org/jira/browse/ATLAS-1876
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Background**
> Refer to ATLAS-1876 for details. Please see the modified steps in comments section.
> 
> **Root Cause**
> _AtlasBuiltInTypes_ do not validate the incoming types using the range check for the
primitive types. This causes out of range _float_ and _double_ values to be passed as valid
even when they are holding _Infinity_.
> 
> While the attribute value assignment goes through within the code, subsequent operations
fail as the correct values are not present in the database.
> 
> **Fix**
> Range check added for _float_ and _double_.
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/type/AtlasBuiltInTypes.java f08a6015 
>   intg/src/test/java/org/apache/atlas/type/AtlasBuiltInTypesTest.java PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60204/diff/1/
> 
> 
> Testing
> -------
> 
> **Unit tests**
> - New unit tests added for _AtlasFloatType_ and _AtlasDoubleType_.
> 
> **Functional tests**
> - Validation verified by following steps mentioned in JIRA. Validation error is returned
instead of successful operation.
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message