cloud-fan 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_r378241896
 
 

 ##########
 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:
   The behavior seems to be
   1. If the regex does not match, return an empty array
   2. if the specified group does not match, put an empty string to the result 
array.
   
   Can we document the behavior in SQL expression? And can you verify this is 
the standard behavior in other databases?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to