Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-2532

Advanced Search DSL: Improve Support for Numeric Data Types at Thresholds

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • trunk
    • 1.0.0
    • atlas-core
    • None

    Description

      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.

       

      Attachments

        1. ATLAS-2532-dsl-max-float.patch
          7 kB
          Ashutosh Mestry

        Activity

          People

            amestry Ashutosh Mestry
            amestry Ashutosh Mestry
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: