[jira] [Commented] (FLINK-9990) Add regexp_extract supported in TableAPI and SQL

2018-10-09 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on FLINK-9990:
---

yanghua commented on issue #6448: [FLINK-9990] [table] Add regexp_extract 
supported in TableAPI and SQL
URL: https://github.com/apache/flink/pull/6448#issuecomment-428410089
 
 
   @xccui Thank you very much for your time and effort. I also have a PR #6432  
about `ASCII/CHR`. When you have time, can you help with the review?


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Add regexp_extract supported in TableAPI and SQL
> 
>
> Key: FLINK-9990
> URL: https://issues.apache.org/jira/browse/FLINK-9990
> Project: Flink
>  Issue Type: Sub-task
>  Components: Table API & SQL
>Reporter: vinoyang
>Assignee: vinoyang
>Priority: Minor
>  Labels: pull-request-available
>
> regex_extract is a very useful function, it returns a string based on a regex 
> pattern and a index.
> For example : 
> {code:java}
> regexp_extract('foothebar', 'foo(.*?)(bar)', 2) // returns 'bar.'
> {code}
> It is provided as a UDF in Hive, more details please see[1].
> [1]: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FLINK-9990) Add regexp_extract supported in TableAPI and SQL

2018-10-09 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on FLINK-9990:
---

asfgit closed pull request #6448: [FLINK-9990] [table] Add regexp_extract 
supported in TableAPI and SQL
URL: https://github.com/apache/flink/pull/6448
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docs/dev/table/functions.md b/docs/dev/table/functions.md
index f888d790deb..6491c81b32e 100644
--- a/docs/dev/table/functions.md
+++ b/docs/dev/table/functions.md
@@ -2496,6 +2496,19 @@ REPLACE(string1, string2, string3)
   
 
 
+
+  
+{% highlight text %}
+REGEXP_EXTRACT(string1, string2[, integer])
+{% endhighlight %}
+  
+  
+Returns a string from string1 which extracted with a 
specified regular expression string2 and a regex match group index 
integer. 
+Note: The regex match group index starts from 1 and 0 means 
matching the whole regex. In addition, The regex match group index should not 
exceed the number of the defined groups. 
+E.g. REGEXP_EXTRACT('foothebar', 'foo(.*?)(bar)', 2)" 
returns "bar".
+  
+
+
 
   
 {% highlight text %}
@@ -2748,6 +2761,19 @@ STRING1.replace(STRING2, STRING3)
   
 
 
+
+  
+{% highlight java %}
+STRING1.regexpExtract(STRING2[, INTEGER1])
+{% endhighlight %}
+  
+  
+Returns a string from STRING1 which extracted with a 
specified regular expression STRING2 and a regex match group index 
INTEGER1.
+Note: The regex match group index starts from 1 and 0 means 
matching the whole regex. In addition, The regex match group index should not 
exceed the number of the defined groups. 
+E.g. 'foothebar'.regexpExtract('foo(.*?)(bar)', 2)" 
returns "bar".
+  
+
+
 
   
 {% highlight java %}
@@ -2999,6 +3025,19 @@ STRING1.replace(STRING2, STRING3)
   
 
 
+
+  
+{% highlight scala %}
+STRING1.regexpExtract(STRING2[, INTEGER1])
+{% endhighlight %}
+  
+  
+Returns a string from STRING1 which extracted with a 
specified regular expression STRING2 and a regex match group index 
INTEGER1.
+Note: The regex match group index starts from 1 and 0 means 
matching the whole regex. In addition, The regex match group index should not 
exceed the number of the defined groups.
+E.g. "foothebar".regexpExtract("foo(.*?)(bar)", 2)" 
returns "bar".
+  
+
+
 
   
 {% highlight scala %}
diff --git 
a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/scala/expressionDsl.scala
 
b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/scala/expressionDsl.scala
index e638051a2bd..e1947c37acf 100644
--- 
a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/scala/expressionDsl.scala
+++ 
b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/scala/expressionDsl.scala
@@ -584,6 +584,18 @@ trait ImplicitExpressionOperations {
   def regexpReplace(regex: Expression, replacement: Expression) =
 RegexpReplace(expr, regex, replacement)
 
+  /**
+* Returns a string extracted with a specified regular expression and a 
regex match group index.
+*/
+  def regexpExtract(regex: Expression, extractIndex: Expression) =
+RegexpExtract(expr, regex, extractIndex)
+
+  /**
+* Returns a string extracted with a specified regular expression.
+*/
+  def regexpExtract(regex: Expression) =
+RegexpExtract(expr, regex, null)
+
   /**
 * Returns the base string decoded with base64.
 */
diff --git 
a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/calls/BuiltInMethods.scala
 
b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/calls/BuiltInMethods.scala
index 34be86e0400..7781b57825e 100644
--- 
a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/calls/BuiltInMethods.scala
+++ 
b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/calls/BuiltInMethods.scala
@@ -143,6 +143,19 @@ object BuiltInMethods {
 classOf[String],
 classOf[String])
 
+  val REGEXP_EXTRACT = Types.lookupMethod(
+classOf[ScalarFunctions],
+"regexp_extract",
+classOf[String],
+classOf[String],
+classOf[Integer])
+
+  val REGEXP_EXTRACT_WITHOUT_INDEX = Types.lookupMethod(
+classOf[ScalarFunctions],
+"regexp_extract",
+classOf[String],
+classOf[String])
+
   val FROMBASE64 = Types.lookupMethod(classOf[ScalarFunctions], "fromBase64", 
classOf[String])
 
   val TOBASE64 = Types.lookupMethod(classOf[Scala

[jira] [Commented] (FLINK-9990) Add regexp_extract supported in TableAPI and SQL

2018-10-09 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on FLINK-9990:
---

yanghua commented on a change in pull request #6448: [FLINK-9990] [table] Add 
regexp_extract supported in TableAPI and SQL
URL: https://github.com/apache/flink/pull/6448#discussion_r223691387
 
 

 ##
 File path: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/functions/ScalarFunctions.scala
 ##
 @@ -219,6 +220,31 @@ object ScalarFunctions {
 str.replaceAll(regex, Matcher.quoteReplacement(replacement))
   }
 
+  /**
+* Returns a string extracted with a specified regular expression and a 
regex match group index.
+*/
+  def regexp_extract(str: String, regex: String, extractIndex: Integer): 
String = {
+if (str == null || regex == null) {
+  return null
+}
+
+val m = Pattern.compile(regex).matcher(str)
+if (m.find) {
+  val mr = m.toMatchResult
+  return mr.group(extractIndex)
+}
+
+""
 
 Review comment:
   Done.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Add regexp_extract supported in TableAPI and SQL
> 
>
> Key: FLINK-9990
> URL: https://issues.apache.org/jira/browse/FLINK-9990
> Project: Flink
>  Issue Type: Sub-task
>  Components: Table API & SQL
>Reporter: vinoyang
>Assignee: vinoyang
>Priority: Minor
>  Labels: pull-request-available
>
> regex_extract is a very useful function, it returns a string based on a regex 
> pattern and a index.
> For example : 
> {code:java}
> regexp_extract('foothebar', 'foo(.*?)(bar)', 2) // returns 'bar.'
> {code}
> It is provided as a UDF in Hive, more details please see[1].
> [1]: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FLINK-9990) Add regexp_extract supported in TableAPI and SQL

2018-10-09 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on FLINK-9990:
---

yanghua commented on a change in pull request #6448: [FLINK-9990] [table] Add 
regexp_extract supported in TableAPI and SQL
URL: https://github.com/apache/flink/pull/6448#discussion_r223679909
 
 

 ##
 File path: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/functions/ScalarFunctions.scala
 ##
 @@ -219,6 +220,31 @@ object ScalarFunctions {
 str.replaceAll(regex, Matcher.quoteReplacement(replacement))
   }
 
+  /**
+* Returns a string extracted with a specified regular expression and a 
regex match group index.
+*/
+  def regexp_extract(str: String, regex: String, extractIndex: Integer): 
String = {
+if (str == null || regex == null) {
+  return null
+}
+
+val m = Pattern.compile(regex).matcher(str)
+if (m.find) {
+  val mr = m.toMatchResult
+  return mr.group(extractIndex)
+}
+
+""
 
 Review comment:
   yes, will fix it, hold on.y


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Add regexp_extract supported in TableAPI and SQL
> 
>
> Key: FLINK-9990
> URL: https://issues.apache.org/jira/browse/FLINK-9990
> Project: Flink
>  Issue Type: Sub-task
>  Components: Table API & SQL
>Reporter: vinoyang
>Assignee: vinoyang
>Priority: Minor
>  Labels: pull-request-available
>
> regex_extract is a very useful function, it returns a string based on a regex 
> pattern and a index.
> For example : 
> {code:java}
> regexp_extract('foothebar', 'foo(.*?)(bar)', 2) // returns 'bar.'
> {code}
> It is provided as a UDF in Hive, more details please see[1].
> [1]: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FLINK-9990) Add regexp_extract supported in TableAPI and SQL

2018-10-09 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on FLINK-9990:
---

xccui commented on a change in pull request #6448: [FLINK-9990] [table] Add 
regexp_extract supported in TableAPI and SQL
URL: https://github.com/apache/flink/pull/6448#discussion_r223678697
 
 

 ##
 File path: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/functions/ScalarFunctions.scala
 ##
 @@ -219,6 +220,31 @@ object ScalarFunctions {
 str.replaceAll(regex, Matcher.quoteReplacement(replacement))
   }
 
+  /**
+* Returns a string extracted with a specified regular expression and a 
regex match group index.
+*/
+  def regexp_extract(str: String, regex: String, extractIndex: Integer): 
String = {
+if (str == null || regex == null) {
+  return null
+}
+
+val m = Pattern.compile(regex).matcher(str)
+if (m.find) {
+  val mr = m.toMatchResult
+  return mr.group(extractIndex)
+}
+
+""
 
 Review comment:
   I think when no matching found, the method should return null instead of an 
empty string, right?


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Add regexp_extract supported in TableAPI and SQL
> 
>
> Key: FLINK-9990
> URL: https://issues.apache.org/jira/browse/FLINK-9990
> Project: Flink
>  Issue Type: Sub-task
>  Components: Table API & SQL
>Reporter: vinoyang
>Assignee: vinoyang
>Priority: Minor
>  Labels: pull-request-available
>
> regex_extract is a very useful function, it returns a string based on a regex 
> pattern and a index.
> For example : 
> {code:java}
> regexp_extract('foothebar', 'foo(.*?)(bar)', 2) // returns 'bar.'
> {code}
> It is provided as a UDF in Hive, more details please see[1].
> [1]: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FLINK-9990) Add regexp_extract supported in TableAPI and SQL

2018-10-09 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on FLINK-9990:
---

xccui commented on issue #6448: [FLINK-9990] [table] Add regexp_extract 
supported in TableAPI and SQL
URL: https://github.com/apache/flink/pull/6448#issuecomment-428171717
 
 
   Thanks for the update @yanghua, I'll merge this.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Add regexp_extract supported in TableAPI and SQL
> 
>
> Key: FLINK-9990
> URL: https://issues.apache.org/jira/browse/FLINK-9990
> Project: Flink
>  Issue Type: Sub-task
>  Components: Table API & SQL
>Reporter: vinoyang
>Assignee: vinoyang
>Priority: Minor
>  Labels: pull-request-available
>
> regex_extract is a very useful function, it returns a string based on a regex 
> pattern and a index.
> For example : 
> {code:java}
> regexp_extract('foothebar', 'foo(.*?)(bar)', 2) // returns 'bar.'
> {code}
> It is provided as a UDF in Hive, more details please see[1].
> [1]: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FLINK-9990) Add regexp_extract supported in TableAPI and SQL

2018-10-03 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on FLINK-9990:
---

yanghua commented on issue #6448: [FLINK-9990] [table] Add regexp_extract 
supported in TableAPI and SQL
URL: https://github.com/apache/flink/pull/6448#issuecomment-426697438
 
 
   @xccui  Thanks for reviewing again, I have updated this PR.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Add regexp_extract supported in TableAPI and SQL
> 
>
> Key: FLINK-9990
> URL: https://issues.apache.org/jira/browse/FLINK-9990
> Project: Flink
>  Issue Type: Sub-task
>  Components: Table API & SQL
>Reporter: vinoyang
>Assignee: vinoyang
>Priority: Minor
>  Labels: pull-request-available
>
> regex_extract is a very useful function, it returns a string based on a regex 
> pattern and a index.
> For example : 
> {code:java}
> regexp_extract('foothebar', 'foo(.*?)(bar)', 2) // returns 'bar.'
> {code}
> It is provided as a UDF in Hive, more details please see[1].
> [1]: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FLINK-9990) Add regexp_extract supported in TableAPI and SQL

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on FLINK-9990:
---

xccui commented on a change in pull request #6448: [FLINK-9990] [table] Add 
regexp_extract supported in TableAPI and SQL
URL: https://github.com/apache/flink/pull/6448#discussion_r221666999
 
 

 ##
 File path: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/scala/expressionDsl.scala
 ##
 @@ -579,6 +579,19 @@ trait ImplicitExpressionOperations {
   def regexpReplace(regex: Expression, replacement: Expression) =
 RegexpReplace(expr, regex, replacement)
 
+  /**
+* Returns a string extracted with a specified regular expression and a 
regex match group index.
+*/
+  def regexpExtract(regex: Expression, extractIndex: Expression) =
+RegexpExtract(expr, regex, extractIndex)
+
+  /**
+* Returns a string extracted with a specified regular expression and
 
 Review comment:
   What does "and an optional regex match group index" mean?


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Add regexp_extract supported in TableAPI and SQL
> 
>
> Key: FLINK-9990
> URL: https://issues.apache.org/jira/browse/FLINK-9990
> Project: Flink
>  Issue Type: Sub-task
>  Components: Table API & SQL
>Reporter: vinoyang
>Assignee: vinoyang
>Priority: Minor
>  Labels: pull-request-available
>
> regex_extract is a very useful function, it returns a string based on a regex 
> pattern and a index.
> For example : 
> {code:java}
> regexp_extract('foothebar', 'foo(.*?)(bar)', 2) // returns 'bar.'
> {code}
> It is provided as a UDF in Hive, more details please see[1].
> [1]: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FLINK-9990) Add regexp_extract supported in TableAPI and SQL

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on FLINK-9990:
---

xccui commented on a change in pull request #6448: [FLINK-9990] [table] Add 
regexp_extract supported in TableAPI and SQL
URL: https://github.com/apache/flink/pull/6448#discussion_r221665820
 
 

 ##
 File path: docs/dev/table/functions.md
 ##
 @@ -2460,6 +2460,19 @@ REPLACE(string1, string2, string3)
   
 
 
+
+  
+{% highlight text %}
+REGEXP_EXTRACT(string1, string2, integer)
 
 Review comment:
   REGEXP_EXTRACT(string1, string2[, integer])


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Add regexp_extract supported in TableAPI and SQL
> 
>
> Key: FLINK-9990
> URL: https://issues.apache.org/jira/browse/FLINK-9990
> Project: Flink
>  Issue Type: Sub-task
>  Components: Table API & SQL
>Reporter: vinoyang
>Assignee: vinoyang
>Priority: Minor
>  Labels: pull-request-available
>
> regex_extract is a very useful function, it returns a string based on a regex 
> pattern and a index.
> For example : 
> {code:java}
> regexp_extract('foothebar', 'foo(.*?)(bar)', 2) // returns 'bar.'
> {code}
> It is provided as a UDF in Hive, more details please see[1].
> [1]: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FLINK-9990) Add regexp_extract supported in TableAPI and SQL

2018-10-02 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on FLINK-9990:
---

xccui commented on a change in pull request #6448: [FLINK-9990] [table] Add 
regexp_extract supported in TableAPI and SQL
URL: https://github.com/apache/flink/pull/6448#discussion_r221666556
 
 

 ##
 File path: docs/dev/table/functions.md
 ##
 @@ -2963,6 +2989,19 @@ STRING1.replace(STRING2, STRING3)
   
 
 
+
+  
+{% highlight scala %}
+STRING1.regexpExtract(STRING2, INTEGER1)
+{% endhighlight %}
+  
+  
+Returns a string from STRING1 which extracted with a 
specified regular expression STRING2 and a regex match group index 
INTEGER1.
+Note: The regex match group index should starts from 1 and 0 
represents matching the whole regexp. In addition, The regex match group index 
should not exceed the number of the defined groups.
 
 Review comment:
   The regex match group index ~~should~~ starts from 1, and 0 means...
   In addition, the index should not...
   ~~regexp~~ -> regex


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Add regexp_extract supported in TableAPI and SQL
> 
>
> Key: FLINK-9990
> URL: https://issues.apache.org/jira/browse/FLINK-9990
> Project: Flink
>  Issue Type: Sub-task
>  Components: Table API & SQL
>Reporter: vinoyang
>Assignee: vinoyang
>Priority: Minor
>  Labels: pull-request-available
>
> regex_extract is a very useful function, it returns a string based on a regex 
> pattern and a index.
> For example : 
> {code:java}
> regexp_extract('foothebar', 'foo(.*?)(bar)', 2) // returns 'bar.'
> {code}
> It is provided as a UDF in Hive, more details please see[1].
> [1]: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FLINK-9990) Add regexp_extract supported in TableAPI and SQL

2018-10-01 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on FLINK-9990:
---

yanghua commented on issue #6448: [FLINK-9990] [table] Add regexp_extract 
supported in TableAPI and SQL
URL: https://github.com/apache/flink/pull/6448#issuecomment-425945851
 
 
   @pnowojski can you review and merge this PR? Thanks.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Add regexp_extract supported in TableAPI and SQL
> 
>
> Key: FLINK-9990
> URL: https://issues.apache.org/jira/browse/FLINK-9990
> Project: Flink
>  Issue Type: Sub-task
>  Components: Table API & SQL
>Reporter: vinoyang
>Assignee: vinoyang
>Priority: Minor
>  Labels: pull-request-available
>
> regex_extract is a very useful function, it returns a string based on a regex 
> pattern and a index.
> For example : 
> {code:java}
> regexp_extract('foothebar', 'foo(.*?)(bar)', 2) // returns 'bar.'
> {code}
> It is provided as a UDF in Hive, more details please see[1].
> [1]: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FLINK-9990) Add regexp_extract supported in TableAPI and SQL

2018-09-20 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on FLINK-9990:
---

xccui commented on a change in pull request #6448: [FLINK-9990] [table] Add 
regexp_extract supported in TableAPI and SQL
URL: https://github.com/apache/flink/pull/6448#discussion_r219375972
 
 

 ##
 File path: docs/dev/table/functions.md
 ##
 @@ -2448,6 +2448,18 @@ SUBSTRING(string FROM integer1 [ FOR integer2 ])
   
 
 
+
+  
+{% highlight text %}
+REGEXP_EXTRACT(string1, string2, integer1)
 
 Review comment:
   When there's only one int parameter, just name it with "integer".


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Add regexp_extract supported in TableAPI and SQL
> 
>
> Key: FLINK-9990
> URL: https://issues.apache.org/jira/browse/FLINK-9990
> Project: Flink
>  Issue Type: Sub-task
>  Components: Table API & SQL
>Reporter: vinoyang
>Assignee: vinoyang
>Priority: Minor
>  Labels: pull-request-available
>
> regex_extract is a very useful function, it returns a string based on a regex 
> pattern and a index.
> For example : 
> {code:java}
> regexp_extract('foothebar', 'foo(.*?)(bar)', 2) // returns 'bar.'
> {code}
> It is provided as a UDF in Hive, more details please see[1].
> [1]: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FLINK-9990) Add regexp_extract supported in TableAPI and SQL

2018-09-15 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on FLINK-9990:
---

yanghua commented on issue #6448: [FLINK-9990] [table] Add regexp_extract 
supported in TableAPI and SQL
URL: https://github.com/apache/flink/pull/6448#issuecomment-421553068
 
 
   @xccui I have rebased this PR, can you take a look? Thanks.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Add regexp_extract supported in TableAPI and SQL
> 
>
> Key: FLINK-9990
> URL: https://issues.apache.org/jira/browse/FLINK-9990
> Project: Flink
>  Issue Type: Sub-task
>  Components: Table API & SQL
>Reporter: vinoyang
>Assignee: vinoyang
>Priority: Minor
>  Labels: pull-request-available
>
> regex_extract is a very useful function, it returns a string based on a regex 
> pattern and a index.
> For example : 
> {code:java}
> regexp_extract('foothebar', 'foo(.*?)(bar)', 2) // returns 'bar.'
> {code}
> It is provided as a UDF in Hive, more details please see[1].
> [1]: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)