beliefer commented on a change in pull request #27507: [SPARK-24884][SQL] 
Support regexp function regexp_extract_all
URL: https://github.com/apache/spark/pull/27507#discussion_r378290232
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/functions.scala
 ##########
 @@ -2383,6 +2383,17 @@ object functions {
     RegExpExtract(e.expr, lit(exp).expr, lit(groupIdx).expr)
   }
 
+  /**
+   * Extract all specific group matched by a Java regex, from the specified 
string column.
+   * If the regex did not match, or the specified group did not match, an 
empty array is returned.
 
 Review comment:
   2. should throw a IllegalArgumentException. 
   https://github.com/apache/spark/pull/27508
   the behavior of Hive is :
   `FAILED: SemanticException [Error 10014]: Line 1:7 Wrong arguments ‘2’: 
org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method 
public java.lang.String 
org.apache.hadoop.hive.ql.udf.UDFRegExpExtract.evaluate(java.lang.String,java.lang.String,java.lang.Integer)
 on object org.apache.hadoop.hive.ql.udf.UDFRegExpExtract@2cf5e0f0 of class 
org.apache.hadoop.hive.ql.udf.UDFRegExpExtract with arguments 
{x=a3&x=18abc&x=2&y=3&x=4:java.lang.String, x=([0-9]+)[a-z]:java.lang.String, 
2:java.lang.Integer} of size 3`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to