[
https://issues.apache.org/jira/browse/DRILL-8278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17578932#comment-17578932
]
ASF GitHub Bot commented on DRILL-8278:
---------------------------------------
jnturton opened a new pull request, #2621:
URL: https://github.com/apache/drill/pull/2621
# [DRILL-8278](https://issues.apache.org/jira/browse/DRILL-8278): The period
character '.' is broken in SQL LIKE patterns
## Description
The '.' character is added to the JAVA_REGEX_SPECIALS string in RegexpUtil
(as has subsequently happened in the Calcite code that was originally copied to
create this class).
It will now be possible to use '.' correctly in queries like `show databases
where table_schema like 'dfs.%'`
## Documentation
No change.
## Testing
TestSqlPatterns#testSqlRegexLike
> The period character '.' is broken in SQL LIKE patterns
> -------------------------------------------------------
>
> Key: DRILL-8278
> URL: https://issues.apache.org/jira/browse/DRILL-8278
> Project: Apache Drill
> Issue Type: Bug
> Components: SQL Parser
> Affects Versions: 1.20.2
> Reporter: James Turton
> Assignee: James Turton
> Priority: Minor
> Fix For: 1.20.3
>
>
> In LIKE patterns, the period character is treated as a wildcard when it
> should act as a simple literal.
>
> {code:java}
> apache drill> show databases where schema_name like 'dfs.%';
> SCHEMA_NAME dfs.default
> SCHEMA_NAME dfs.root
> SCHEMA_NAME dfs.tmp
> SCHEMA_NAME dfsfoo.default -- should not be present
> SCHEMA_NAME dfsfoo.root -- should not be present
> SCHEMA_NAME dfsfoo.tmp -- should not be present
> 6 rows selected (0.256 seconds)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)