Abhishek Pal created ATLAS-4711:
-----------------------------------

             Summary: Atlas can't handle string in integer fields for filters
                 Key: ATLAS-4711
                 URL: https://issues.apache.org/jira/browse/ATLAS-4711
             Project: Atlas
          Issue Type: Bug
          Components:  atlas-core
    Affects Versions: 2.2.0
            Reporter: Abhishek Pal


Currently if we pass a string in the filter value via API using contains 
operator, it gives a *500 :Internal Server Error* which isn't expected, since 
there should be a handling of this case.
Ex:

*Attribute definition:*
{code:json}
{
       "name":"type_int_rand",
       "typeName":"int",
       "isOptional":true,
       "cardinality":"SINGLE",
       "valuesMinCount":0,
       "valuesMaxCount":1,
       "isUnique":false,
       "isIndexable":false
}
{code}

Now if we pass a filter via API as:
{code}
criterion": [
       {
           "attributeName": "type_int_rand",
           "operator": "contains",
           "attributeValue": "7 "
       }
]
{code}
Here notice the space after *7* in attributeValue. This causes it to be treated 
as a string instead of int and throws an Internal Server Error.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to