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/22 11:43:10 UTC

[GitHub] [flink] XuQianJin-Stars opened a new pull request #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

XuQianJin-Stars opened a new pull request #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186
 
 
   ## What is the purpose of the change
   
   Support `JSON_EXISTS` function for blink planner
   
   ## Brief change log
   
   *(for example:)*
   
   - Introduce `JSON_EXISTS` 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 edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154707717",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154812055",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6586",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/155453812",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6658",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a0bba3877b6baecbbb5800bfe3d47f77436f4c80 UNKNOWN
   * a6303e86357a0e09ee816e6a5773b35129f8032b Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/154812055) Azure: [CANCELED](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6586) 
   * 7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/155453812) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6658) 
   
   <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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154707717",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154812055",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6586",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/155453812",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6658",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7062",
       "triggerID" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/158360379",
       "triggerID" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a0bba3877b6baecbbb5800bfe3d47f77436f4c80 UNKNOWN
   * 24a54acba404b0c735d2fdaf0cdad3197cfb3678 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/158360379) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7062) 
   
   <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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154707717",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 40f14cb429ac19428fffd6e2ddbee20f0299a7b4 Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/154655718) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544) 
   * f7a82f1eb46103c6d3e106a16b9790ef443741e3 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/154707717) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548) 
   
   <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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 10030ba9942f214290e8c4dd45e7e6de480ef6d3 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/150140709) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461) 
   
   <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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154707717",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154812055",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6586",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/155453812",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6658",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7062",
       "triggerID" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/158360379",
       "triggerID" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b77f46a525bc717636c1a0e414395f7d7c6c3529",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/158748343",
       "triggerID" : "b77f46a525bc717636c1a0e414395f7d7c6c3529",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b77f46a525bc717636c1a0e414395f7d7c6c3529",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7108",
       "triggerID" : "b77f46a525bc717636c1a0e414395f7d7c6c3529",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a0bba3877b6baecbbb5800bfe3d47f77436f4c80 UNKNOWN
   * b77f46a525bc717636c1a0e414395f7d7c6c3529 Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/158748343) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7108) 
   
   <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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/JsonFunctionsTest.scala
 ##########
 @@ -125,4 +127,53 @@ class JsonFunctionsTest extends ExpressionTestBase {
     }
   }
 
+  @Test
+  def testJsonExists(): Unit = {
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo' false on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo' true on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo' unknown on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo' false on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo' true on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo' unknown on error)", "true")
+    testSqlApi("json_exists('{}', "
+      + "'invalid $.foo' false on error)", "false")
+    testSqlApi("json_exists('{}', "
+      + "'invalid $.foo' true on error)", "true")
+    testSqlApi("json_exists('{}', "
+      + "'invalid $.foo' unknown on error)", "null")
+    testSqlApi("json_exists(cast('{\"foo\":\"bar\"}' as varchar), "
+      + "'strict $.foo1')", "false")
+
+    // not exists
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo1' false on error)", "false")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo1' true on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo1' unknown on error)", "null")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo1' true on error)", "false")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo1' false on error)", "false")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo1' error on error)", "false")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo1' unknown on error)", "false")
+
+    // nulls
+    testSqlApi("json_exists(cast(null as varchar), 'lax $' unknown on error)", "null")
+  }
+
+  @Test
+  def testJsonFuncError(): Unit = {
+    expectedException.expect(classOf[CodeGenException])
+    expectedException.expectMessage(startsWith("Unsupported call: JSON_EXISTS"))
 
 Review comment:
   I got what you want to throw for the exception. Currently, Calcite JSON_EXISTS definition accepts any type for first argument, however, we only support string in the code generation (do you know why Calcite accept any type?)
   
   For this purpose, I would suggest to define JSON_EXISTS ourselves:
   
   ```
   	public static final SqlFunction JSON_EXISTS = new SqlFunction(
   		"JSON_EXISTS",
   		SqlKind.OTHER_FUNCTION,
   		ReturnTypes.cascade(ReturnTypes.BOOLEAN, SqlTypeTransforms.FORCE_NULLABLE), null,
   		OperandTypes.or(
   			OperandTypes.family(SqlTypeFamily.CHARACTER, SqlTypeFamily.CHARACTER),
   			OperandTypes.family(SqlTypeFamily.CHARACTER, SqlTypeFamily.CHARACTER, SqlTypeFamily.ANY)),
   		SqlFunctionCategory.SYSTEM);
   ```
   
   In this way, the exception will be more reable, and we don't need the "hack" in `StringCallGen.scala`. 
   
   ```
   ValidationException: SQL validation failed. From line 1, column 8 to line 1, column 48: Cannot apply 'JSON_EXISTS' to arguments of type 'JSON_EXISTS(<INTEGER>, <CHAR(5)>, <SYMBOL>)'. Supported form(s): 'JSON_EXISTS(<CHARACTER>, <CHARACTER>)'
   'JSON_EXISTS(<CHARACTER>, <CHARACTER>, <ANY>)'
   ```

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 40f14cb429ac19428fffd6e2ddbee20f0299a7b4 Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/154655718) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544) 
   
   <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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 10030ba9942f214290e8c4dd45e7e6de480ef6d3 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/150140709) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461) 
   * 40f14cb429ac19428fffd6e2ddbee20f0299a7b4 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 a change in pull request #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/BuiltInFunctionDefinitions.java
 ##########
 @@ -674,6 +674,14 @@
 			.outputTypeStrategy(TypeStrategies.MISSING)
 			.build();
 
+	// json functions
+	public static final BuiltInFunctionDefinition JSON_EXISTS =
 
 Review comment:
   we don't need to add it here if we only aim to SQL.

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154707717",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154812055",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6586",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/155453812",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6658",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7062",
       "triggerID" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/158360379",
       "triggerID" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b77f46a525bc717636c1a0e414395f7d7c6c3529",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/158748343",
       "triggerID" : "b77f46a525bc717636c1a0e414395f7d7c6c3529",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b77f46a525bc717636c1a0e414395f7d7c6c3529",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7108",
       "triggerID" : "b77f46a525bc717636c1a0e414395f7d7c6c3529",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a0bba3877b6baecbbb5800bfe3d47f77436f4c80 UNKNOWN
   * 24a54acba404b0c735d2fdaf0cdad3197cfb3678 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/158360379) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7062) 
   * b77f46a525bc717636c1a0e414395f7d7c6c3529 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/158748343) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7108) 
   
   <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 a change in pull request #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/JsonFunctionsTest.scala
 ##########
 @@ -125,4 +127,53 @@ class JsonFunctionsTest extends ExpressionTestBase {
     }
   }
 
+  @Test
+  def testJsonExists(): Unit = {
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo' false on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo' true on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo' unknown on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo' false on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo' true on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo' unknown on error)", "true")
+    testSqlApi("json_exists('{}', "
+      + "'invalid $.foo' false on error)", "false")
+    testSqlApi("json_exists('{}', "
+      + "'invalid $.foo' true on error)", "true")
+    testSqlApi("json_exists('{}', "
+      + "'invalid $.foo' unknown on error)", "null")
+    testSqlApi("json_exists(cast('{\"foo\":\"bar\"}' as varchar), "
+      + "'strict $.foo1')", "false")
+
+    // not exists
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo1' false on error)", "false")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo1' true on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo1' unknown on error)", "null")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo1' true on error)", "false")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo1' false on error)", "false")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo1' error on error)", "false")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo1' unknown on error)", "false")
+
+    // nulls
+    testSqlApi("json_exists(cast(null as varchar), 'lax $' unknown on error)", "null")
+  }
+
+  @Test
+  def testJsonFuncError(): Unit = {
+    expectedException.expect(classOf[CodeGenException])
+    expectedException.expectMessage(startsWith("Unsupported call: JSON_EXISTS"))
 
 Review comment:
   > This exception message is still misleading. We already support `JSON_EXISTS`, why the exception says not? I think we should improve the exception to give a better understandable message, e.g. `the json path 'lax $' is illegal.`
   
   Because `JSON_EXISTS (INT, CHAR (5) NOT NULL, RAW ('org.apache.calcite.sql.SqlJsonExistsErrorBehavior',?)` This is not supported. The json path 'lax $' is illegal will return `false`.

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154707717",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154812055",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6586",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/155453812",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6658",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a0bba3877b6baecbbb5800bfe3d47f77436f4c80 UNKNOWN
   * 7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/155453812) Azure: [CANCELED](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6658) 
   * 24a54acba404b0c735d2fdaf0cdad3197cfb3678 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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
XuQianJin-Stars commented on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-602758175
 
 
   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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154707717",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154812055",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6586",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/155453812",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6658",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a0bba3877b6baecbbb5800bfe3d47f77436f4c80 UNKNOWN
   * 7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/155453812) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6658) 
   
   <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 a change in pull request #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/BuiltInFunctionDefinitions.java
 ##########
 @@ -674,6 +674,14 @@
 			.outputTypeStrategy(TypeStrategies.MISSING)
 			.build();
 
+	// json functions
+	public static final BuiltInFunctionDefinition JSON_EXISTS =
 
 Review comment:
   > we don't need to add it here if we only aim to SQL.
   
   well, I removed 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 a change in pull request #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/ScalarFunctionsTest.scala
 ##########
 @@ -4195,4 +4195,48 @@ class ScalarFunctionsTest extends ScalarTypesTestBase {
       "f55=f57",
       "true")
   }
+
+  //-------------------------------------------------------------------
+  // JSON functions
+  //-------------------------------------------------------------------
+  @Test
+  def testJsonExists(): Unit = {
 
 Review comment:
   These tests actually test only SQL expressions, not table api expressions. Have you ever tried to run those expressions from Table API?

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   Hash:10030ba9942f214290e8c4dd45e7e6de480ef6d3 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/150140709 TriggerType:PUSH TriggerID:10030ba9942f214290e8c4dd45e7e6de480ef6d3
   Hash:10030ba9942f214290e8c4dd45e7e6de480ef6d3 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461 TriggerType:PUSH TriggerID:10030ba9942f214290e8c4dd45e7e6de480ef6d3
   -->
   ## CI report:
   
   * 10030ba9942f214290e8c4dd45e7e6de480ef6d3 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/150140709) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461) 
   
   <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 commented on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589948358
 
 
   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 10030ba9942f214290e8c4dd45e7e6de480ef6d3 (Sat Feb 22 11:45:02 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] libenchao commented on a change in pull request #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/FunctionGenerator.scala
 ##########
 @@ -801,6 +801,20 @@ object FunctionGenerator {
       new MethodCallGen(
         BuiltInMethod.IS_JSON_SCALAR.method)))
 
+  addSqlFunctionMethod(
+    JSON_EXISTS,
+    Seq(CHAR, CHAR),
 
 Review comment:
   What about `Seq(VARCHAR, CHAR)`/`Seq(CHAR, VARCHAR)`?

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154707717",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154812055",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6586",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a0bba3877b6baecbbb5800bfe3d47f77436f4c80 UNKNOWN
   * a6303e86357a0e09ee816e6a5773b35129f8032b Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/154812055) Azure: [CANCELED](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6586) 
   
   <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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154707717",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154812055",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6586",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a0bba3877b6baecbbb5800bfe3d47f77436f4c80 UNKNOWN
   * a6303e86357a0e09ee816e6a5773b35129f8032b Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/154812055) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6586) 
   
   <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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154707717",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154812055",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6586",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/155453812",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6658",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7062",
       "triggerID" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/158360379",
       "triggerID" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a0bba3877b6baecbbb5800bfe3d47f77436f4c80 UNKNOWN
   * 7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/155453812) Azure: [CANCELED](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6658) 
   * 24a54acba404b0c735d2fdaf0cdad3197cfb3678 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/158360379) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7062) 
   
   <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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/expressions/jsonExpressions.scala
 ##########
 @@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.flink.table.planner.expressions
+
+import org.apache.flink.api.common.typeinfo.BasicTypeInfo._
+import org.apache.flink.api.common.typeinfo.TypeInformation
+import org.apache.flink.table.planner.typeutils.TypeInfoCheckUtils
+import org.apache.flink.table.planner.validate.{ValidationFailure, ValidationResult}
+
+case class JsonExists(child: PlannerExpression, path: PlannerExpression)
+  extends PlannerExpression with InputTypeSpec {
+  override private[flink] def resultType: TypeInformation[_] = BOOLEAN_TYPE_INFO
+
+  override private[flink] def children: Seq[PlannerExpression] =
+    Seq(child, path)
+
+  override private[flink] def expectedTypes: Seq[TypeInformation[_]] =
+    Seq(STRING_TYPE_INFO, STRING_TYPE_INFO)
+
+  override def toString: String = s"json_exists(${children.mkString(",")})"
+
+  override private[flink] def validateInput(): ValidationResult = {
+    if (child != null && path != null) {
+      if (!TypeInfoCheckUtils.isString(child.resultType) ||
+        !TypeInfoCheckUtils.isString(path.resultType)) {
+        ValidationFailure(s"json_exists num requires int, get " +
+          s"$child : ${child.resultType}, $path : ${path.resultType}")
+      }
+    }
+    TypeInfoCheckUtils.assertNumericExpr(BOOLEAN_TYPE_INFO, s"json_exists base :$child")
 
 Review comment:
   And assert a constant is meaningless.

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "CANCELED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154707717",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f7a82f1eb46103c6d3e106a16b9790ef443741e3 Travis: [CANCELED](https://travis-ci.com/github/flink-ci/flink/builds/154707717) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548) 
   * a0bba3877b6baecbbb5800bfe3d47f77436f4c80 UNKNOWN
   * a6303e86357a0e09ee816e6a5773b35129f8032b 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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
libenchao commented on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-602958823
 
 
   One more tip, you don't need to force push your branch each time when addressing comments, it will be hard for the reviewers to track changes.

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 40f14cb429ac19428fffd6e2ddbee20f0299a7b4 Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/154655718) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544) 
   * f7a82f1eb46103c6d3e106a16b9790ef443741e3 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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154707717",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154812055",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6586",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/155453812",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6658",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7062",
       "triggerID" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/158360379",
       "triggerID" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b77f46a525bc717636c1a0e414395f7d7c6c3529",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "b77f46a525bc717636c1a0e414395f7d7c6c3529",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a0bba3877b6baecbbb5800bfe3d47f77436f4c80 UNKNOWN
   * 24a54acba404b0c735d2fdaf0cdad3197cfb3678 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/158360379) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7062) 
   * b77f46a525bc717636c1a0e414395f7d7c6c3529 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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154707717",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154812055",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6586",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/155453812",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6658",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7062",
       "triggerID" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/158360379",
       "triggerID" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a0bba3877b6baecbbb5800bfe3d47f77436f4c80 UNKNOWN
   * 24a54acba404b0c735d2fdaf0cdad3197cfb3678 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/158360379) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7062) 
   
   <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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/JsonFunctionsTest.scala
 ##########
 @@ -125,4 +127,53 @@ class JsonFunctionsTest extends ExpressionTestBase {
     }
   }
 
+  @Test
+  def testJsonExists(): Unit = {
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo' false on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo' true on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo' unknown on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo' false on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo' true on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo' unknown on error)", "true")
+    testSqlApi("json_exists('{}', "
+      + "'invalid $.foo' false on error)", "false")
+    testSqlApi("json_exists('{}', "
+      + "'invalid $.foo' true on error)", "true")
+    testSqlApi("json_exists('{}', "
+      + "'invalid $.foo' unknown on error)", "null")
+    testSqlApi("json_exists(cast('{\"foo\":\"bar\"}' as varchar), "
+      + "'strict $.foo1')", "false")
+
+    // not exists
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo1' false on error)", "false")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo1' true on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo1' unknown on error)", "null")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo1' true on error)", "false")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo1' false on error)", "false")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo1' error on error)", "false")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo1' unknown on error)", "false")
+
+    // nulls
+    testSqlApi("json_exists(cast(null as varchar), 'lax $' unknown on error)", "null")
+  }
+
+  @Test
+  def testJsonFuncError(): Unit = {
+    expectedException.expect(classOf[CodeGenException])
+    expectedException.expectMessage(startsWith("Unsupported call: JSON_EXISTS"))
 
 Review comment:
   I got what you want to throw for the exception. Currently, Calcite JSON_EXISTS definition accepts any type for first argument, however, we only support string in the code generation (do you know why Calcite accept any type?)
   
   For this purpose, I would suggest to define JSON_EXISTS ourselves:
   
   ```java
   	public static final SqlFunction JSON_EXISTS = new SqlFunction(
   		"JSON_EXISTS",
   		SqlKind.OTHER_FUNCTION,
   		ReturnTypes.cascade(ReturnTypes.BOOLEAN, SqlTypeTransforms.FORCE_NULLABLE), null,
   		OperandTypes.or(
   			OperandTypes.family(SqlTypeFamily.CHARACTER, SqlTypeFamily.CHARACTER),
   			OperandTypes.family(SqlTypeFamily.CHARACTER, SqlTypeFamily.CHARACTER, SqlTypeFamily.ANY)),
   		SqlFunctionCategory.SYSTEM);
   ```
   
   In this way, the exception will be more reable, and we don't need the "hack" in `StringCallGen.scala`. 
   
   ```
   ValidationException: SQL validation failed. From line 1, column 8 to line 1, column 48: Cannot apply 'JSON_EXISTS' to arguments of type 'JSON_EXISTS(<INTEGER>, <CHAR(5)>, <SYMBOL>)'. Supported form(s): 'JSON_EXISTS(<CHARACTER>, <CHARACTER>)'
   'JSON_EXISTS(<CHARACTER>, <CHARACTER>, <ANY>)'
   ```

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   Hash:10030ba9942f214290e8c4dd45e7e6de480ef6d3 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:10030ba9942f214290e8c4dd45e7e6de480ef6d3
   -->
   ## CI report:
   
   * 10030ba9942f214290e8c4dd45e7e6de480ef6d3 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 a change in pull request #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/BuiltInFunctionDefinitions.java
 ##########
 @@ -674,6 +674,14 @@
 			.outputTypeStrategy(TypeStrategies.MISSING)
 			.build();
 
+	// json functions
+	public static final BuiltInFunctionDefinition JSON_EXISTS =
+		new BuiltInFunctionDefinition.Builder()
+			.name("json_exists")
+			.kind(SCALAR)
+			.outputTypeStrategy(TypeStrategies.MISSING)
 
 Review comment:
   > It's weird, why not directly specify the outputType? I know that all function definitions are all defined with `MISSING` strategy, and it make me more confuse.
   
   The type specified here becomes a cast.

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/ScalarFunctionsTest.scala
 ##########
 @@ -4195,4 +4195,48 @@ class ScalarFunctionsTest extends ScalarTypesTestBase {
       "f55=f57",
       "true")
   }
+
+  //-------------------------------------------------------------------
+  // JSON functions
+  //-------------------------------------------------------------------
+  @Test
+  def testJsonExists(): Unit = {
 
 Review comment:
   > I prefer we do not add these table api related expressions for now,
   
   You are right, Let me do not add these table api related expressions for 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] libenchao commented on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
libenchao commented on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-604757565
 
 
   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] flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "CANCELED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154707717",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f7a82f1eb46103c6d3e106a16b9790ef443741e3 Travis: [CANCELED](https://travis-ci.com/github/flink-ci/flink/builds/154707717) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548) 
   * a0bba3877b6baecbbb5800bfe3d47f77436f4c80 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] wuchong commented on a change in pull request #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/JsonFunctionsTest.scala
 ##########
 @@ -125,4 +127,53 @@ class JsonFunctionsTest extends ExpressionTestBase {
     }
   }
 
+  @Test
+  def testJsonExists(): Unit = {
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo' false on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo' true on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo' unknown on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo' false on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo' true on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo' unknown on error)", "true")
+    testSqlApi("json_exists('{}', "
+      + "'invalid $.foo' false on error)", "false")
+    testSqlApi("json_exists('{}', "
+      + "'invalid $.foo' true on error)", "true")
+    testSqlApi("json_exists('{}', "
+      + "'invalid $.foo' unknown on error)", "null")
+    testSqlApi("json_exists(cast('{\"foo\":\"bar\"}' as varchar), "
+      + "'strict $.foo1')", "false")
+
+    // not exists
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo1' false on error)", "false")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo1' true on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo1' unknown on error)", "null")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo1' true on error)", "false")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo1' false on error)", "false")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo1' error on error)", "false")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo1' unknown on error)", "false")
+
+    // nulls
+    testSqlApi("json_exists(cast(null as varchar), 'lax $' unknown on error)", "null")
+  }
+
+  @Test
+  def testJsonFuncError(): Unit = {
+    expectedException.expect(classOf[CodeGenException])
+    expectedException.expectMessage(startsWith("Unsupported call: JSON_EXISTS"))
 
 Review comment:
   This exception message is still misleading. We already support `JSON_EXISTS`, why the exception says not? I think we should improve the exception to give a better understandable message, e.g. `the json path 'lax $' is illegal.`

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "CANCELED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154707717",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f7a82f1eb46103c6d3e106a16b9790ef443741e3 Travis: [CANCELED](https://travis-ci.com/github/flink-ci/flink/builds/154707717) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548) 
   * a0bba3877b6baecbbb5800bfe3d47f77436f4c80 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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154707717",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154812055",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6586",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/155453812",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6658",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a0bba3877b6baecbbb5800bfe3d47f77436f4c80 UNKNOWN
   * 7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/155453812) Azure: [CANCELED](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6658) 
   
   <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 a change in pull request #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/FunctionGenerator.scala
 ##########
 @@ -801,6 +801,20 @@ object FunctionGenerator {
       new MethodCallGen(
         BuiltInMethod.IS_JSON_SCALAR.method)))
 
+  addSqlFunctionMethod(
+    JSON_EXISTS,
+    Seq(CHAR, CHAR),
 
 Review comment:
   > According to SQL 2016 Standard:
   > 
   > ```
   > <JSON API common syntax> ::= <JSON context item> <comma> <JSON path specification> [ AS <JSON table path name> ] [ <JSON passing clause> ]
   > <JSON context item> ::= <JSON value expression>
   > <JSON path specification> ::= <character string literal>
   > ```
   > 
   > Second parameter can only be string literal, and in Flink, it's `CHAR` type.
   
   Thank you very much for your analysis, it has helped me a lot.

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154707717",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154812055",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6586",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/155453812",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6658",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7062",
       "triggerID" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/158360379",
       "triggerID" : "24a54acba404b0c735d2fdaf0cdad3197cfb3678",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b77f46a525bc717636c1a0e414395f7d7c6c3529",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/158748343",
       "triggerID" : "b77f46a525bc717636c1a0e414395f7d7c6c3529",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b77f46a525bc717636c1a0e414395f7d7c6c3529",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7108",
       "triggerID" : "b77f46a525bc717636c1a0e414395f7d7c6c3529",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a0bba3877b6baecbbb5800bfe3d47f77436f4c80 UNKNOWN
   * b77f46a525bc717636c1a0e414395f7d7c6c3529 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/158748343) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7108) 
   
   <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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   Hash:10030ba9942f214290e8c4dd45e7e6de480ef6d3 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/150140709 TriggerType:PUSH TriggerID:10030ba9942f214290e8c4dd45e7e6de480ef6d3
   Hash:10030ba9942f214290e8c4dd45e7e6de480ef6d3 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461 TriggerType:PUSH TriggerID:10030ba9942f214290e8c4dd45e7e6de480ef6d3
   -->
   ## CI report:
   
   * 10030ba9942f214290e8c4dd45e7e6de480ef6d3 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/150140709) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461) 
   
   <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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/FunctionGenerator.scala
 ##########
 @@ -22,10 +22,8 @@ import org.apache.flink.table.planner.functions.sql.FlinkSqlOperatorTable._
 import org.apache.flink.table.runtime.types.PlannerTypeUtils.isPrimitive
 import org.apache.flink.table.types.logical.LogicalTypeRoot._
 import org.apache.flink.table.types.logical.{LogicalType, LogicalTypeRoot}
-
 import org.apache.calcite.sql.SqlOperator
 import org.apache.calcite.util.BuiltInMethod
-
 
 Review comment:
   don't need to remove these blank lines.

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/ScalarFunctionsTest.scala
 ##########
 @@ -4195,4 +4195,48 @@ class ScalarFunctionsTest extends ScalarTypesTestBase {
       "f55=f57",
       "true")
   }
+
+  //-------------------------------------------------------------------
+  // JSON functions
+  //-------------------------------------------------------------------
+  @Test
+  def testJsonExists(): Unit = {
 
 Review comment:
   Do you mean supporting these json functions in SQL first? Or just testing for SQL?
   If the answer is supporting these json functions in SQL firstly, I prefer we do not add these table api related expressions for now, which are not tested for 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] libenchao commented on a change in pull request #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/FunctionGenerator.scala
 ##########
 @@ -801,6 +801,20 @@ object FunctionGenerator {
       new MethodCallGen(
         BuiltInMethod.IS_JSON_SCALAR.method)))
 
+  addSqlFunctionMethod(
+    JSON_EXISTS,
+    Seq(CHAR, CHAR),
 
 Review comment:
   According to SQL 2016 Standard: 
   ```
   <JSON API common syntax> ::= <JSON context item> <comma> <JSON path specification> [ AS <JSON table path name> ] [ <JSON passing clause> ]
   <JSON context item> ::= <JSON value expression>
   <JSON path specification> ::= <character string literal>
   ```
   Second parameter can only be string literal, and in Flink, it's `CHAR` type. 

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/ScalarFunctionsTest.scala
 ##########
 @@ -4195,4 +4195,48 @@ class ScalarFunctionsTest extends ScalarTypesTestBase {
       "f55=f57",
       "true")
   }
+
+  //-------------------------------------------------------------------
+  // JSON functions
+  //-------------------------------------------------------------------
+  @Test
+  def testJsonExists(): Unit = {
 
 Review comment:
   > These tests actually test only SQL expressions, not table api expressions. Have you ever tried to run those expressions from Table API?
   
   @wuchong  recommends just SQL  expressions first.

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
XuQianJin-Stars edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-602992990
 
 
   > One more tip, you don't need to force push your branch each time when addressing comments, it will be hard for the reviewers to track changes.
   
   ok, There was a conflict before.

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/JsonFunctionsTest.scala
 ##########
 @@ -125,4 +127,53 @@ class JsonFunctionsTest extends ExpressionTestBase {
     }
   }
 
+  @Test
+  def testJsonExists(): Unit = {
 
 Review comment:
   Could you add a more complex test? Checking existence on a nested fields? e.g. `json_exist(f0, 'lax $.info.address[0].state')`. You can take [Sql Server](https://docs.microsoft.com/en-us/sql/t-sql/functions/json-value-transact-sql?view=sql-server-ver15#lax-mode-and-strict-mode) as an example. 

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/BuiltInMethods.scala
 ##########
 @@ -22,11 +22,13 @@ import org.apache.flink.table.dataformat.{Decimal, SqlTimestamp}
 import org.apache.flink.table.runtime.functions._
 import org.apache.calcite.avatica.util.TimeUnitRange
 import org.apache.calcite.linq4j.tree.Types
-import org.apache.calcite.runtime.SqlFunctions
+import org.apache.calcite.runtime.{JsonFunctions, SqlFunctions}
 import java.lang.reflect.Method
 import java.lang.{Byte => JByte, Integer => JInteger, Long => JLong, Short => JShort}
 import java.util.TimeZone
 
+import org.apache.calcite.sql.SqlJsonExistsErrorBehavior
 
 Review comment:
   import needs to be ordered alphabetically.

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 40f14cb429ac19428fffd6e2ddbee20f0299a7b4 Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/154655718) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544) 
   
   <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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/BuiltInFunctionDefinitions.java
 ##########
 @@ -674,6 +674,14 @@
 			.outputTypeStrategy(TypeStrategies.MISSING)
 			.build();
 
+	// json functions
+	public static final BuiltInFunctionDefinition JSON_EXISTS =
+		new BuiltInFunctionDefinition.Builder()
+			.name("json_exists")
+			.kind(SCALAR)
+			.outputTypeStrategy(TypeStrategies.MISSING)
 
 Review comment:
   It's weird, why not directly specify the outputType? I know that all function definitions are all defined with `MISSING` strategy, and it make me more confuse.

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
XuQianJin-Stars commented on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-602992990
 
 
   > One more tip, you don't need to force push your branch each time when addressing comments, it will be hard for the reviewers to track changes.
   
   ok

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154707717",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154812055",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6586",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a0bba3877b6baecbbb5800bfe3d47f77436f4c80 UNKNOWN
   * a6303e86357a0e09ee816e6a5773b35129f8032b Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/154812055) Azure: [CANCELED](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6586) 
   * 7c7c9f907e8d0b6ad94bdb17fc84730ade5ff34f 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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "CANCELED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154707717",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154812055",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6586",
       "triggerID" : "a6303e86357a0e09ee816e6a5773b35129f8032b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f7a82f1eb46103c6d3e106a16b9790ef443741e3 Travis: [CANCELED](https://travis-ci.com/github/flink-ci/flink/builds/154707717) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548) 
   * a0bba3877b6baecbbb5800bfe3d47f77436f4c80 UNKNOWN
   * a6303e86357a0e09ee816e6a5773b35129f8032b Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/154812055) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6586) 
   
   <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 a change in pull request #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/FunctionGenerator.scala
 ##########
 @@ -801,6 +801,20 @@ object FunctionGenerator {
       new MethodCallGen(
         BuiltInMethod.IS_JSON_SCALAR.method)))
 
+  addSqlFunctionMethod(
+    JSON_EXISTS,
+    Seq(CHAR, CHAR),
 
 Review comment:
   > What about `Seq(VARCHAR, CHAR)`/`Seq(CHAR, VARCHAR)`?
   
   ```
     public SqlJsonExistsFunction() {
       super("JSON_EXISTS", SqlKind.OTHER_FUNCTION,
           ReturnTypes.cascade(ReturnTypes.BOOLEAN, SqlTypeTransforms.FORCE_NULLABLE), null,
           OperandTypes.or(
               OperandTypes.family(SqlTypeFamily.ANY, SqlTypeFamily.CHARACTER),
               OperandTypes.family(SqlTypeFamily.ANY, SqlTypeFamily.CHARACTER, SqlTypeFamily.ANY)),
           SqlFunctionCategory.SYSTEM);
     }
   ```
   The `path` parameter can only be CHAR.  This need to add `Seq(VARCHAR, CHAR)`

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner
URL: https://github.com/apache/flink/pull/11186#issuecomment-589950295
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150140709",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5461",
       "triggerID" : "10030ba9942f214290e8c4dd45e7e6de480ef6d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154655718",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544",
       "triggerID" : "40f14cb429ac19428fffd6e2ddbee20f0299a7b4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/154707717",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548",
       "triggerID" : "f7a82f1eb46103c6d3e106a16b9790ef443741e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a0bba3877b6baecbbb5800bfe3d47f77436f4c80",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 40f14cb429ac19428fffd6e2ddbee20f0299a7b4 Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/154655718) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6544) 
   * f7a82f1eb46103c6d3e106a16b9790ef443741e3 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/154707717) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=6548) 
   * a0bba3877b6baecbbb5800bfe3d47f77436f4c80 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 a change in pull request #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/JsonFunctionsTest.scala
 ##########
 @@ -125,4 +127,53 @@ class JsonFunctionsTest extends ExpressionTestBase {
     }
   }
 
+  @Test
+  def testJsonExists(): Unit = {
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo' false on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo' true on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo' unknown on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo' false on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo' true on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo' unknown on error)", "true")
+    testSqlApi("json_exists('{}', "
+      + "'invalid $.foo' false on error)", "false")
+    testSqlApi("json_exists('{}', "
+      + "'invalid $.foo' true on error)", "true")
+    testSqlApi("json_exists('{}', "
+      + "'invalid $.foo' unknown on error)", "null")
+    testSqlApi("json_exists(cast('{\"foo\":\"bar\"}' as varchar), "
+      + "'strict $.foo1')", "false")
+
+    // not exists
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo1' false on error)", "false")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo1' true on error)", "true")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'strict $.foo1' unknown on error)", "null")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo1' true on error)", "false")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo1' false on error)", "false")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo1' error on error)", "false")
+    testSqlApi("json_exists('{\"foo\":\"bar\"}', "
+      + "'lax $.foo1' unknown on error)", "false")
+
+    // nulls
+    testSqlApi("json_exists(cast(null as varchar), 'lax $' unknown on error)", "null")
+  }
+
+  @Test
+  def testJsonFuncError(): Unit = {
+    expectedException.expect(classOf[CodeGenException])
+    expectedException.expectMessage(startsWith("Unsupported call: JSON_EXISTS"))
 
 Review comment:
   > This exception message is still misleading. We already support `JSON_EXISTS`, why the exception says not? I think we should improve the exception to give a better understandable message, e.g. `the json path 'lax $' is illegal.`
   
   Because `JSON_EXISTS (INT, CHAR (5) NOT NULL, RAW ('org.apache.calcite.sql.SqlJsonExistsErrorBehavior',?)` This is not supported. The json path 'lax $' is illegal will return `false`. Like `verifyException`.

----------------------------------------------------------------
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 #11186: [FLINK-16200][sql] Support JSON_EXISTS for blink planner

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

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/expressions/jsonExpressions.scala
 ##########
 @@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.flink.table.planner.expressions
+
+import org.apache.flink.api.common.typeinfo.BasicTypeInfo._
+import org.apache.flink.api.common.typeinfo.TypeInformation
+import org.apache.flink.table.planner.typeutils.TypeInfoCheckUtils
+import org.apache.flink.table.planner.validate.{ValidationFailure, ValidationResult}
+
+case class JsonExists(child: PlannerExpression, path: PlannerExpression)
+  extends PlannerExpression with InputTypeSpec {
+  override private[flink] def resultType: TypeInformation[_] = BOOLEAN_TYPE_INFO
+
+  override private[flink] def children: Seq[PlannerExpression] =
+    Seq(child, path)
+
+  override private[flink] def expectedTypes: Seq[TypeInformation[_]] =
+    Seq(STRING_TYPE_INFO, STRING_TYPE_INFO)
+
+  override def toString: String = s"json_exists(${children.mkString(",")})"
+
+  override private[flink] def validateInput(): ValidationResult = {
+    if (child != null && path != null) {
+      if (!TypeInfoCheckUtils.isString(child.resultType) ||
+        !TypeInfoCheckUtils.isString(path.resultType)) {
+        ValidationFailure(s"json_exists num requires int, get " +
+          s"$child : ${child.resultType}, $path : ${path.resultType}")
+      }
+    }
+    TypeInfoCheckUtils.assertNumericExpr(BOOLEAN_TYPE_INFO, s"json_exists base :$child")
 
 Review comment:
   `BOOLEAN_TYPE_INFO` is not numerical.

----------------------------------------------------------------
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