[ 
https://issues.apache.org/jira/browse/SPARK-29264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16938952#comment-16938952
 ] 

Maxim Gekk commented on SPARK-29264:
------------------------------------

Remove Rlike from the ignore set after fix: 
[https://github.com/apache/spark/pull/25942/files#diff-5a2e7f03d14856c8769fd3ddea8742bdR171]

> Incorrect example for the RLike expression
> ------------------------------------------
>
>                 Key: SPARK-29264
>                 URL: https://issues.apache.org/jira/browse/SPARK-29264
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Maxim Gekk
>            Priority: Minor
>
> The example for RLIKE is incorrect: 
> https://github.com/apache/spark/blob/a428f406693f1c372dc0e378f6b413eca9e367ac/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/regexpExpressions.scala#L174
> {code}
> spark-sql> SET spark.sql.parser.escapedStringLiterals=true;
> spark.sql.parser.escapedStringLiterals        true
> spark-sql> SELECT '%SystemDrive%\Users\John' rlike '%SystemDrive%\Users.*';
> 19/09/26 23:33:13 ERROR SparkSQLDriver: Failed in [SELECT 
> '%SystemDrive%\Users\John' rlike '%SystemDrive%\Users.*']
> java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence 
> near index 14
> %SystemDrive%\Users.*
>               ^
>       at java.util.regex.Pattern.error(Pattern.java:1957)
>       at java.util.regex.Pattern.escape(Pattern.java:2473)
>       at java.util.regex.Pattern.atom(Pattern.java:2200)
>       at java.util.regex.Pattern.sequence(Pattern.java:2132)
>       at java.util.regex.Pattern.expr(Pattern.java:1998)
>       at java.util.regex.Pattern.compile(Pattern.java:1698)
>       at java.util.regex.Pattern.<init>(Pattern.java:1351)
>       at java.util.regex.Pattern.compile(Pattern.java:1028)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to