You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Siddharth Dave (JIRA)" <ji...@apache.org> on 2018/12/13 06:10:00 UTC

[jira] [Created] (ARROW-4016) Wrong filtering using LIKE operator

Siddharth Dave created ARROW-4016:
-------------------------------------

             Summary: Wrong filtering using LIKE operator
                 Key: ARROW-4016
                 URL: https://issues.apache.org/jira/browse/ARROW-4016
             Project: Apache Arrow
          Issue Type: Bug
          Components: Gandiva
            Reporter: Siddharth Dave


[This issue was discovered during internal testing in Dremio in the java layer]

I noticed that the LIKE operator is not behaving as it should per SQL standard. Notably it seems to consider \{{.}} as a wildcard in some occasions:

{code:sql}
SELECT A FROM (VALUES('abcde'), ('abc.e'), ('abcd'), ('abc.'), ('abc')) TBL(A) WHERE A LIKE 'abc_%'
abcde
abc.e
abcd
abc.
abc 
{code}

{code:sql}
SELECT A FROM (VALUES('abcde'), ('abc.e'), ('abcd'), ('abc.'), ('abc')) TBL(A) WHERE A LIKE 'abc.%'
abcde
abc.e
abcd
abc.
abc 
{code}

{code:sql}
SELECT A FROM (VALUES('abcde'), ('abc.e'), ('abcd'), ('abc.'), ('abc')) TBL(A) WHERE A LIKE 'abc_'
(no result)
{code}


{code:sql}
SELECT A FROM (VALUES('abcde'), ('abc.e'), ('abcd'), ('abc.'), ('abc')) TBL(A) WHERE A LIKE 'abc.'
(no result)
{code}

 

Based on code review it seemed that same issue may be present in Gandiva. This bug is to verify & fix it in Gandiva as well.



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