You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/02/23 02:51:06 UTC

[GitHub] [flink] XuQianJin-Stars opened a new pull request #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

XuQianJin-Stars opened a new pull request #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188
 
 
   ## What is the purpose of the change
   
   Support `JSON_QUERY` function for blink planner
   
   ## Brief change log
   
   *(for example:)*
   
   - Introduce `JSON_QUERY` to `FlinkSqlOperatorTable`
   - Add corresponding test cases
   
   ## Verifying this change
   
   *(Please pick either of the following options)*
   
   This change added tests in `ScalarFunctionsTest.scala` 
   
   *(example:)*
   
   - *Added integration tests for end-to-end deployment with large payloads (100MB)*
   - *Extended integration test for recovery after master (JobManager) failure*
   - *Added test that validates that TaskInfo is transferred only once across recoveries*
   - *Manually verified the change by running a 4 node cluser with 2 JobManagers and 4 TaskManagers, a stateful streaming program, and killing one JobManager and two TaskManagers during the execution, verifying that recovery happens correctly.*
   
   ## Does this pull request potentially affect one of the following parts:
   
   - Dependencies (does it add or upgrade a dependency): (yes / no)
   - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / no)
   - The serializers: (yes / no / don't know)
   - The runtime per-record code paths (performance sensitive): (yes / no / don't know)
   - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / no / don't know)
   - The S3 file system connector: (yes / no / don't know)
   
   ## Documentation
   
   - Does this pull request introduce a new feature? (yes / no)
   - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-590021480
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f2e076bd4a4019fc794f6a7af3f3ab36616b2d83 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] XuQianJin-Stars commented on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
XuQianJin-Stars commented on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-602944561
 
 
   > @XuQianJin-Stars Thanks for the updating. LGTM generally.
   > One more question, do you plan to support `JSON_QUERY` in table api? If yes, then we may could add it in this pr or open another issue to track this.
   
   I see @wuchong  has opened a new PR to implement TableApi, and I plan to implement it separately.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-590021125
 
 
   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit f2e076bd4a4019fc794f6a7af3f3ab36616b2d83 (Sun Feb 23 03:03:14 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-590021480
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150180453",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5474",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151213298",
       "triggerID" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/152667676",
       "triggerID" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6138",
       "triggerID" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/152667676) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6138) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-590021480
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150180453",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5474",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151213298",
       "triggerID" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a6964a6f5ea0193a80f80a7052059b7ca3729c03 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/151213298) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-590021480
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150180453",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5474",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151213298",
       "triggerID" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f2e076bd4a4019fc794f6a7af3f3ab36616b2d83 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/150180453) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5474) 
   * a6964a6f5ea0193a80f80a7052059b7ca3729c03 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/151213298) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-590021480
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150180453",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5474",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151213298",
       "triggerID" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/152667676",
       "triggerID" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6138",
       "triggerID" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24e1cb6fe9b1fe7097abb183e6a2558570595112",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "24e1cb6fe9b1fe7097abb183e6a2558570595112",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/152667676) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6138) 
   * 24e1cb6fe9b1fe7097abb183e6a2558570595112 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] libenchao commented on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
libenchao commented on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-602158775
 
 
   @XuQianJin-Stars Do you think that we need to add some tests like:
   1. fail on invalid input and path, and validate the exceptions are threw correctly?
   2. fail on wrong field types?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] XuQianJin-Stars commented on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
XuQianJin-Stars commented on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-597165571
 
 
   hi, @wuchong I have addressed it.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] libenchao commented on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
libenchao commented on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-602943856
 
 
   @XuQianJin-Stars Thanks for the updating. LGTM generally.
   One more question, do you plan to support `JSON_QUERY` in table api? If yes, then we may could add it in this pr or open another issue to track this.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-590021480
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150180453",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f2e076bd4a4019fc794f6a7af3f3ab36616b2d83 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/150180453) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-590021125
 
 
   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit f2e076bd4a4019fc794f6a7af3f3ab36616b2d83 (Fri Feb 28 21:49:42 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] XuQianJin-Stars commented on a change in pull request #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
XuQianJin-Stars commented on a change in pull request #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#discussion_r383002213
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/FunctionGenerator.scala
 ##########
 @@ -753,6 +753,15 @@ object FunctionGenerator {
     Seq(FLOAT, INTEGER),
     BuiltInMethods.TRUNCATE_FLOAT)
 
+  addSqlFunctionMethod(
+    JSON_QUERY,
+    Seq(VARCHAR, CHAR, RAW, RAW, RAW),
 
 Review comment:
   > Just curious, `SqlStdOperatorTable.JSON_VALUE` has 7 parameters, why here only 5?
   
   `SqlStdOperatorTable.JSON_QUERY ` have only 5.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] wuchong commented on a change in pull request #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#discussion_r385535362
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/ScalarFunctionsTest.scala
 ##########
 @@ -4195,4 +4195,53 @@ class ScalarFunctionsTest extends ScalarTypesTestBase {
       "f55=f57",
       "true")
   }
+
+  //-------------------------------------------------------------------
+  // JSON functions
+  //-------------------------------------------------------------------
+  @Test
+  def testJsonQuery(): Unit = {
 
 Review comment:
   Let's move json tests to a new test class, e.g. `JsonFunctionsTest`. `ScalarFunctionsTest` is too large now.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] wuchong commented on a change in pull request #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#discussion_r385535789
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/ScalarFunctionsTest.scala
 ##########
 @@ -4195,4 +4195,53 @@ class ScalarFunctionsTest extends ScalarTypesTestBase {
       "f55=f57",
       "true")
   }
+
+  //-------------------------------------------------------------------
+  // JSON functions
+  //-------------------------------------------------------------------
+  @Test
+  def testJsonQuery(): Unit = {
+    // lax test
+    testSqlApi("json_query('{\"foo\":100}', 'lax $' null on empty)", "{\"foo\":100}")
 
 Review comment:
   Could you add an other test without error behavior? `json_query('{\"foo\":100}', 'lax $'`.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-590021480
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150180453",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5474",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f2e076bd4a4019fc794f6a7af3f3ab36616b2d83 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/150180453) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5474) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-590021480
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150180453",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5474",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151213298",
       "triggerID" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/152667676",
       "triggerID" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6138",
       "triggerID" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24e1cb6fe9b1fe7097abb183e6a2558570595112",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6542",
       "triggerID" : "24e1cb6fe9b1fe7097abb183e6a2558570595112",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24e1cb6fe9b1fe7097abb183e6a2558570595112",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154649715",
       "triggerID" : "24e1cb6fe9b1fe7097abb183e6a2558570595112",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/152667676) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6138) 
   * 24e1cb6fe9b1fe7097abb183e6a2558570595112 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/154649715) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6542) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] wuchong commented on a change in pull request #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#discussion_r385535655
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/ScalarFunctionsTest.scala
 ##########
 @@ -4195,4 +4195,53 @@ class ScalarFunctionsTest extends ScalarTypesTestBase {
       "f55=f57",
       "true")
   }
+
+  //-------------------------------------------------------------------
+  // JSON functions
+  //-------------------------------------------------------------------
+  @Test
+  def testJsonQuery(): Unit = {
+    // lax test
+    testSqlApi("json_query('{\"foo\":100}', 'lax $' null on empty)", "{\"foo\":100}")
+    testSqlApi("json_query('{\"foo\":100}', 'lax $' error on empty)", "{\"foo\":100}")
+    testSqlApi("json_query('{\"foo\":100}', 'lax $' empty array on empty)", "{\"foo\":100}");
+    testSqlApi("json_query('{\"foo\":100}', 'lax $' empty object on empty)", "{\"foo\":100}");
+    testSqlApi("json_query('{\"foo\":100}', 'lax $.foo' null on empty)", "null");
+    testSqlApi("json_query('{\"foo\":100}', 'lax $.foo' empty array on empty)", "[]");
+    testSqlApi("json_query('{\"foo\":100}', 'lax $.foo' empty object on empty)", "{}");
+
+    // path error test
+    testSqlApi("json_query('{\"foo\":100}', 'invalid $.foo' null on error)", "null");
+    testSqlApi("json_query('{\"foo\":100}', 'invalid $.foo' empty array on error)", "[]");
+    testSqlApi("json_query('{\"foo\":100}', 'invalid $.foo' empty object on error)", "{}");
+
+    // strict test
+    testSqlApi("json_query('{\"foo\":100}', 'strict $' null on empty)", "{\"foo\":100}");
+    testSqlApi("json_query('{\"foo\":100}', 'strict $' error on empty)", "{\"foo\":100}");
+    testSqlApi("json_query('{\"foo\":100}', 'strict $' empty array on error)", "{\"foo\":100}");
+    testSqlApi("json_query('{\"foo\":100}', 'strict $' empty object on error)", "{\"foo\":100}");
+
+    testSqlApi("json_query('{\"foo\":100}', 'strict $.foo1' null on error)", "null");
+    testSqlApi("json_query('{\"foo\":100}', 'strict $.foo1' empty array on error)", "[]");
+    testSqlApi("json_query('{\"foo\":100}', 'strict $.foo1' empty object on error)", "{}");
+    testSqlApi("json_query('{\"foo\":100}', 'strict $.foo' null on error)", "null");
+    testSqlApi("json_query('{\"foo\":100}', 'strict $.foo' empty array on error)", "[]");
+    testSqlApi("json_query('{\"foo\":100}', 'strict $.foo' empty object on error)", "{}");
+
+    // array wrapper test
+    testSqlApi("json_query('{\"foo\":100}', 'strict $.foo' without wrapper)", "null");
+    testSqlApi("json_query('{\"foo\":100}', 'strict $.foo' without array wrapper)", "null");
+    testSqlApi("json_query('{\"foo\":100}', 'strict $.foo' with wrapper)", "[100]");
+    testSqlApi("json_query('{\"foo\":100}', 'strict $.foo' with unconditional wrapper)", "[100]");
+    testSqlApi("json_query('{\"foo\":100}', 'strict $.foo' with conditional wrapper)", "[100]");
+    testSqlApi("json_query('{\"foo\":[100]}', 'strict $.foo' without wrapper)", "[100]");
+    testSqlApi("json_query('{\"foo\":[100]}', 'strict $.foo' without array wrapper)", "[100]");
+    testSqlApi("json_query('{\"foo\":[100]}', 'strict $.foo' with wrapper)", "[[100]]");
+    testSqlApi("json_query('{\"foo\":[100]}', 'strict $.foo' with unconditional wrapper)",
+      "[[100]]");
+    testSqlApi("json_query('{\"foo\":[100]}', 'strict $.foo' with conditional wrapper)", "[100]");
+
+    // nulls
+    testSqlApi("json_query(cast(null as varchar), 'lax $')", "null")
 
 Review comment:
   Please also add some tests on a column reference? Currently, all the testing data is char.
   Please also test on non-string columns.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] libenchao commented on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
libenchao commented on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-602956285
 
 
   LGTM, +1 for merging.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] XuQianJin-Stars edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
XuQianJin-Stars edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-602668244
 
 
   > 2\. fail on wrong field types?
   
   1. invalid path already exists,invalid input can add.
   2. Tried this type of error can not be a catch.
   ```
       try {
         testSqlApi("json_query(f7, 'lax $' error on empty)", "null")
       } catch {
         case e: Exception => {
           assertEquals(e.getClass, expectedException)
         }
       }
   ```
   ![image](https://user-images.githubusercontent.com/10494131/77331975-68269800-6d5c-11ea-90f6-b12e94c0206c.png)

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-590021480
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150180453",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5474",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151213298",
       "triggerID" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/152667676",
       "triggerID" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6138",
       "triggerID" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a6964a6f5ea0193a80f80a7052059b7ca3729c03 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/151213298) 
   * d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/152667676) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6138) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] XuQianJin-Stars commented on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
XuQianJin-Stars commented on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-602668244
 
 
   > 2\. fail on wrong field types?
   
   1. invalid path already exists,invalid input can add.
   2. Tried this type of error can not be a catch.
   Tried this type of error can not be a catch.
   ```
       try {
         testSqlApi("json_query(f7, 'lax $' error on empty)", "null")
       } catch {
         case e: Exception => {
           assertEquals(e.getClass, expectedException)
         }
       }
   ```
   ![image](https://user-images.githubusercontent.com/10494131/77331975-68269800-6d5c-11ea-90f6-b12e94c0206c.png)

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] libenchao commented on a change in pull request #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
libenchao commented on a change in pull request #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#discussion_r383002042
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/FunctionGenerator.scala
 ##########
 @@ -753,6 +753,15 @@ object FunctionGenerator {
     Seq(FLOAT, INTEGER),
     BuiltInMethods.TRUNCATE_FLOAT)
 
+  addSqlFunctionMethod(
+    JSON_QUERY,
+    Seq(VARCHAR, CHAR, RAW, RAW, RAW),
 
 Review comment:
   Just curious, `SqlStdOperatorTable.JSON_VALUE` has 7 parameters, why here only 5?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-590021480
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150180453",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5474",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151213298",
       "triggerID" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/152667676",
       "triggerID" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6138",
       "triggerID" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24e1cb6fe9b1fe7097abb183e6a2558570595112",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6542",
       "triggerID" : "24e1cb6fe9b1fe7097abb183e6a2558570595112",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24e1cb6fe9b1fe7097abb183e6a2558570595112",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154649715",
       "triggerID" : "24e1cb6fe9b1fe7097abb183e6a2558570595112",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 24e1cb6fe9b1fe7097abb183e6a2558570595112 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/154649715) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6542) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] XuQianJin-Stars commented on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
XuQianJin-Stars commented on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-602741072
 
 
   hi, @libenchao I addressed it.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-590021480
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150180453",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5474",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151213298",
       "triggerID" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/152667676",
       "triggerID" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6138",
       "triggerID" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24e1cb6fe9b1fe7097abb183e6a2558570595112",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6542",
       "triggerID" : "24e1cb6fe9b1fe7097abb183e6a2558570595112",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24e1cb6fe9b1fe7097abb183e6a2558570595112",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154649715",
       "triggerID" : "24e1cb6fe9b1fe7097abb183e6a2558570595112",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 24e1cb6fe9b1fe7097abb183e6a2558570595112 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/154649715) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6542) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-590021480
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150180453",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5474",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151213298",
       "triggerID" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a6964a6f5ea0193a80f80a7052059b7ca3729c03 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/151213298) 
   * d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] libenchao commented on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
libenchao commented on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-602677222
 
 
   @XuQianJin-Stars 
   1. invalid path indeed exists, what if we do not specify error handler? like `json_query(f8, 'invalid $.name')`
   2. about testing the expected exception, you could refer `ExpressionTestBase.thrown`.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-590021480
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150180453",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5474",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f2e076bd4a4019fc794f6a7af3f3ab36616b2d83 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/150180453) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5474) 
   * a6964a6f5ea0193a80f80a7052059b7ca3729c03 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#issuecomment-590021480
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150180453",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5474",
       "triggerID" : "f2e076bd4a4019fc794f6a7af3f3ab36616b2d83",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151213298",
       "triggerID" : "a6964a6f5ea0193a80f80a7052059b7ca3729c03",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/152667676",
       "triggerID" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6138",
       "triggerID" : "d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d6e82dbd6b2ff6fad8f549777ce2d94da7c1351b Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/152667676) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6138) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] libenchao commented on a change in pull request #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
libenchao commented on a change in pull request #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#discussion_r383009446
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/FunctionGenerator.scala
 ##########
 @@ -753,6 +753,15 @@ object FunctionGenerator {
     Seq(FLOAT, INTEGER),
     BuiltInMethods.TRUNCATE_FLOAT)
 
+  addSqlFunctionMethod(
+    JSON_QUERY,
+    Seq(VARCHAR, CHAR, RAW, RAW, RAW),
 
 Review comment:
   Sorry for the noisy,  not notice it's `JSON_QUERY`,  instead of `JSON_VALUE`.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] XuQianJin-Stars commented on a change in pull request #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner

Posted by GitBox <gi...@apache.org>.
XuQianJin-Stars commented on a change in pull request #11188: [FLINK-16202][sql] Support JSON_QUERY for blink planner
URL: https://github.com/apache/flink/pull/11188#discussion_r383002213
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/FunctionGenerator.scala
 ##########
 @@ -753,6 +753,15 @@ object FunctionGenerator {
     Seq(FLOAT, INTEGER),
     BuiltInMethods.TRUNCATE_FLOAT)
 
+  addSqlFunctionMethod(
+    JSON_QUERY,
+    Seq(VARCHAR, CHAR, RAW, RAW, RAW),
 
 Review comment:
   > Just curious, `SqlStdOperatorTable.JSON_VALUE` has 7 parameters, why here only 5?
   
   `SqlStdOperatorTable. JSON_QUERY ` have only 5.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services