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

Regression: DSL query with "like" clause returns unexpected entities for custom entity type.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.1.0, 3.0.0
    • None
    • None

    Description

      Problem

      1. Created a custom type type1 with string attributes name and type_str
      2. Created 2 entities of type1:
        1. name : entity1 , type_str : rand_str
        2. name : entity2 , type_str : str_rand
      3. Fired DSL query : type1 where type_str like "rand*"

      Expected that , entity1 only will be returned , but entity2 is also returned.

      For all the following queries , both entities are returned:

      1.type1 where type_str like "rand*"

      2.type1 where type_str like "*rand"

      3.type1 where type_str like "rand"

       

      Basic search filter "begins with" works correctly. Issue seems to be with only DSL search. The issue is consistently reproducible.

       

      Root cause:
      Creating typeDef having attribute with typeName as 'biginteger' or 'bigdecimal', throws exception -

      "java.lang.IllegalArgumentException: Unsupported data type [class java.math.BigInteger] for field: ftol", 

      This affects text search.

       

       

      Solution:
      Added check to allow if data type of attribute is BigInteger or BigDecimal.

      Attachments

        1. ATLAS-3504-DSL-query-with-like-clause-returns-unexpected-results-p2.patch
          1 kB
          Nikhil P Bonte
        2. ATLAS-3504-DSL-query-with-like-clause-returns-unexpected-results-v1.patch
          3 kB
          Nikhil P Bonte
        3. entity1
          1 kB
          Nikhil P Bonte
        4. entity2
          1 kB
          Nikhil P Bonte
        5. type
          10 kB
          Nikhil P Bonte

        Issue Links

          Activity

            People

              nbonte Nikhil P Bonte
              nbonte Nikhil P Bonte
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: