Ashutosh Mestry created ATLAS-2532:
--------------------------------------

             Summary: Advanced Search DSL: Improve Support for Numeric Data 
Types at Thresholds
                 Key: ATLAS-2532
                 URL: https://issues.apache.org/jira/browse/ATLAS-2532
             Project: Atlas
          Issue Type: Bug
          Components:  atlas-core
    Affects Versions: trunk
            Reporter: Ashutosh Mestry
            Assignee: Ashutosh Mestry


Steps to duplicate the problem:
 * Added this property to _fs_path_

                _{_

                    _"name": "retention",_

                    _"typeName": "float",_

                    _"cardinality": "SINGLE",_

                    _"isIndexable": false,_

                    _"isOptional": true,_

                    _"isUnique": false_

                _}_
 * From Atlas WEB UI, add _hdfs_path_ entity. Set the _retention_ property to 
3.4028235e+38.
 * From Atlas WEB UI, Adanced Search use: hdfs_path where retention > 
3.4028235e+38

Actual behavior: Error _‘__Gremlin script execution failed: 
g.V().has('__typeName', 'hdfs_path').has('hdfs_path.retention', 
gt(3.4028235e+38)).dedup().limit(25).toList()’_ is displayed.

Expected behavior: Results should be displayed.

Root cause:
 * Since the value is on threshold of max float, Gremlin converts this to 
_BigDecimal_ and then does the comparision.

 

Fix:
 * Using _‘f’_ to suppress conversion to _BigDecimal_ should address the 
problem.
 * Using _g.V().has('__typeName', 'hdfs_path').has('hdfs_path.retention', 
lte(3.4028235e+38f)).dedup().limit(25).toList()_ addresses the problem.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to