atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Mestry (Jira)" <j...@apache.org>
Subject [jira] [Updated] (ATLAS-3520) Regression: DSL query with "like" clause with "_" and "AND" returns unexpected entities.
Date Wed, 20 Nov 2019 19:02:00 GMT

     [ https://issues.apache.org/jira/browse/ATLAS-3520?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ashutosh Mestry updated ATLAS-3520:
-----------------------------------
    Description: 
*Problem*

Dataset:

Created a hive_table with name "sample_01" under hive_db having name as "default".

Query: 
{code:java}
hive_table db.name="default" and qualifiedName like "*sample_01*"
{code}
It is expected that above query should return 1 hive_table entity having qualifiedName = default.sample_01@cluster,
but it doesn't return any entity.

  

Other queries like following work and return expected results:
{code:java}
hive_table where db.name = "default" (only first part of query)

hive_table qualifiedName like "*sample_01*"  (only second part of query)

hive_table where db.name = "default" and name like "sample_01" (updating only second part
of query)

hive_table db.name="default" and qualifiedName = "default.sample_01@cluster" (using "=" instead
of "like" with full qualifiedName)
{code}
 

*Additional Information*

For the type of queries mentioned above, _org.janusgraph.core.attribute.Text.textContainsRegex_
is used to perform comparison. This method within _JanusGraph_ is done in 2 steps:
 * Tokenize the incoming stream.
 * Perform regex match on the tokens from the step above.

The tokenization routine aggregates by treating '_' as a delimiter. Thereby failing to match
a string containing '_'.

*Solution*

Within _GreamlinQueryComposer_, detect presence of '_' within the value and resort to using _textRegex_
to match.

 

  was:
*Problem*

Dataset:

Created a hive_table with name "sample_01" under hive_db having name as "default".

Query: 
{code:java}
hive_table db.name="default" and qualifiedName like "*sample_01*"
{code}
It is expected that above query should return 1 hive_table entity having qualifiedName = default.sample_01@cluster,
but it doesn't return any entity.

  

Other queries like following work and return expected results:
{code:java}
hive_table where db.name = "default" (only first part of query)

hive_table qualifiedName like "*sample_01*"  (only second part of query)

hive_table where db.name = "default" and name like "sample_01" (updating only second part
of query)

hive_table db.name="default" and qualifiedName = "default.sample_01@cluster" (using "=" instead
of "like" with full qualifiedName)
{code}


> Regression: DSL query with "like" clause with "_" and "AND" returns unexpected entities.
> ----------------------------------------------------------------------------------------
>
>                 Key: ATLAS-3520
>                 URL: https://issues.apache.org/jira/browse/ATLAS-3520
>             Project: Atlas
>          Issue Type: Bug
>            Reporter: Nikhil Bonte
>            Assignee: Ashutosh Mestry
>            Priority: Major
>
> *Problem*
> Dataset:
> Created a hive_table with name "sample_01" under hive_db having name as "default".
> Query: 
> {code:java}
> hive_table db.name="default" and qualifiedName like "*sample_01*"
> {code}
> It is expected that above query should return 1 hive_table entity having qualifiedName
= default.sample_01@cluster, but it doesn't return any entity.
>   
> Other queries like following work and return expected results:
> {code:java}
> hive_table where db.name = "default" (only first part of query)
> hive_table qualifiedName like "*sample_01*"  (only second part of query)
> hive_table where db.name = "default" and name like "sample_01" (updating only second
part of query)
> hive_table db.name="default" and qualifiedName = "default.sample_01@cluster" (using "="
instead of "like" with full qualifiedName)
> {code}
>  
> *Additional Information*
> For the type of queries mentioned above, _org.janusgraph.core.attribute.Text.textContainsRegex_
is used to perform comparison. This method within _JanusGraph_ is done in 2 steps:
>  * Tokenize the incoming stream.
>  * Perform regex match on the tokens from the step above.
> The tokenization routine aggregates by treating '_' as a delimiter. Thereby failing to
match a string containing '_'.
> *Solution*
> Within _GreamlinQueryComposer_, detect presence of '_' within the value and resort to
using _textRegex_ to match.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message