[
https://issues.apache.org/jira/browse/ARROW-4016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rok Mihevc updated ARROW-4016:
------------------------------
External issue URL: https://github.com/apache/arrow/issues/20618
> [Gandiva] Wrong filtering using LIKE operator
> ---------------------------------------------
>
> Key: ARROW-4016
> URL: https://issues.apache.org/jira/browse/ARROW-4016
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++ - Gandiva
> Reporter: Siddharth Dave
> Assignee: Siddharth Dave
> Priority: Major
>
> [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
(v8.20.10#820010)