[
https://issues.apache.org/jira/browse/CALCITE-5699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julian Hyde resolved CALCITE-5699.
----------------------------------
Fix Version/s: 1.35.0
Resolution: Fixed
Fixed in
[f7ad9093|https://github.com/apache/calcite/commit/f7ad9093f40b813a5ee287ba71c1fe1c234a60c5];
thanks for the PR, [~zstan]!
> Posix regex expressions failed while NOT operator is executed with null
> literals.
> ---------------------------------------------------------------------------------
>
> Key: CALCITE-5699
> URL: https://issues.apache.org/jira/browse/CALCITE-5699
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.34.0
> Reporter: Evgeny Stanilovsky
> Assignee: Evgeny Stanilovsky
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.35.0
>
>
> Operations like :
> {noformat}
> SELECT null !~ 'ab[cd]'
> SELECT 'abcd' !~ null
> SELECT null !~ null
> SELECT null !~* 'ab[cd]'
> SELECT 'abcd' !~* null
> SELECT null !~* null{noformat}
> is not possible for now, NPE is raised :
> {noformat}
> Caused by: java.lang.NullPointerException
> at java.base/java.util.regex.Matcher.getTextLength(Matcher.java:1770)
> at java.base/java.util.regex.Matcher.reset(Matcher.java:416)
> at java.base/java.util.regex.Matcher.<init>(Matcher.java:253)
> at java.base/java.util.regex.Pattern.matcher(Pattern.java:1134)
> at
> org.apache.calcite.runtime.SqlFunctions.posixRegex(SqlFunctions.java:864){noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)