You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/08/19 17:30:00 UTC
[jira] [Commented] (DRILL-8281) Info schema LIKE with ESCAPE push down bug
[ https://issues.apache.org/jira/browse/DRILL-8281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17581968#comment-17581968 ]
ASF GitHub Bot commented on DRILL-8281:
---------------------------------------
jnturton opened a new pull request, #2627:
URL: https://github.com/apache/drill/pull/2627
# [DRILL-8281](https://issues.apache.org/jira/browse/DRILL-8281): Info schema LIKE with ESCAPE push down bug
## Description
[DRILL-8057](https://issues.apache.org/jira/browse/DRILL-8057) brought in a regression whereby info schema LIKE patterns containing an escape character are not correctly processed. For example if a storage plugin called dfs_foo (note the presence of the special '_') is present then the following query wrongly returns no records.
```
apache drill> show databases where schema_name like 'dfs^_foo.%' escape '^';
No rows selected (2.305 seconds)
```
This PR makes schema path prefix comparison use RegexpUtil.SqlPatternInfo#getSimplePatternString when comparing prefixes so that escape characters are correctly processed.
## Documentation
N/A
## Testing
TestInfoSchema#likePatternWithEscapeChar
> Info schema LIKE with ESCAPE push down bug
> ------------------------------------------
>
> Key: DRILL-8281
> URL: https://issues.apache.org/jira/browse/DRILL-8281
> Project: Apache Drill
> Issue Type: Bug
> Components: Storage - Information Schema
> Affects Versions: 1.20.2
> Reporter: James Turton
> Assignee: James Turton
> Priority: Minor
> Fix For: 1.20.3
>
>
> DRILL-8057 brought in a regression whereby info schema LIKE patterns containing an escape character are not correctly processed. For example if a storage plugin called dfs_foo (note the presence of the special '_') is present then the following query wrongly returns no records.
> {code:java}
> apache drill> show databases where schema_name like 'dfs^_foo.%' escape '^';
> No rows selected (2.305 seconds){code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)