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

Apache Spark commented on SPARK-32365:
--------------------------------------

User 'beliefer' has created a pull request for this issue:
https://github.com/apache/spark/pull/29161

> Fix java.lang.IndexOutOfBoundsException: No group -1
> ----------------------------------------------------
>
>                 Key: SPARK-32365
>                 URL: https://issues.apache.org/jira/browse/SPARK-32365
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.0.1, 3.1.0
>            Reporter: jiaan.geng
>            Priority: Major
>
> The current implement of regexp_extract will throws a unprocessed exception 
> show below:
> SELECT regexp_extract('1a 2b 14m', 'd+' -1)
> {code:java}
> java.lang.IndexOutOfBoundsException: No group -1
> java.util.regex.Matcher.group(Matcher.java:538)
> org.apache.spark.sql.catalyst.expressions.RegExpExtract.nullSafeEval(regexpExpressions.scala:455)
> org.apache.spark.sql.catalyst.expressions.TernaryExpression.eval(Expression.scala:704)
> org.apache.spark.sql.catalyst.optimizer.ConstantFolding$$anonfun$apply$1$$anonfun$applyOrElse$1.applyOrElse(expressions.scala:52)
> org.apache.spark.sql.catalyst.optimizer.ConstantFolding$$anonfun$apply$1$$anonfun$applyOrElse$1.applyOrElse(expressions.scala:45)
> {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