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 2021/02/24 12:53:28 UTC
[GitHub] [flink] LadyForest opened a new pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
LadyForest opened a new pull request #15005:
URL: https://github.com/apache/flink/pull/15005
## What is the purpose of the change
This pull request supports using the module(s) by `USE MODULES x [, y, z, ...]` syntax in both SQL parser, TableEnvironment, and SQL CLI.
## Brief change log
- Extend `Parser.tdd` and `parserImpls.ftl` templates for both `flink-sql-parser` and `flink-sql-parser-hive` to support syntax. Add `SqlUseModules` to represent the SqlNode after parsing.
- Extend `FlinkPlannerImpl`, `SqlToOperationConverter` and`TableEnvironmentImpl` to support operation transformation.
- Add SqlCli support.
## Verifying this change
This change added tests and can be verified as follows:
- Added tests in `FlinkSqlParserImplTest` and `FlinkHiveSqlParserImplTest` to verify parsing syntax correctly.
- Added tests in `SqlToOperatorConverterTest` to verify operation transforming behaves correctly. Added tests in `TableEnvironmentTest` to verify module discovery and module enabling/disabling behave correctly.
- Added tests in `SqlCommandParserTest` and `LocalExecutorITCase` to verify SqlCli behaves 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, Kubernetes/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**)
- Docs will be updated after FLINK-21300 finish.
----------------------------------------------------------------
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
[GitHub] [flink] wuchong commented on a change in pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #15005:
URL: https://github.com/apache/flink/pull/15005#discussion_r584428711
##########
File path: flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/LocalExecutor.java
##########
@@ -428,6 +429,13 @@ public ProgramTargetDescriptor executeUpdate(String sessionId, String statement)
return executeUpdateInternal(sessionId, context, statement);
}
+ @VisibleForTesting
+ List<ModuleEntry> listFullModules(String sessionId) throws SqlExecutionException {
Review comment:
Thanks for the explanation.
----------------------------------------------------------------
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
[GitHub] [flink] flinkbot edited a comment on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-785063045
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699",
"triggerID" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"triggerType" : "PUSH"
}, {
"hash" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13844",
"triggerID" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924",
"triggerID" : "9c55937b18787dc4817c939be841554396cf8659",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948",
"triggerID" : "788003325",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924",
"triggerID" : "788003325",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13972",
"triggerID" : "788662635",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948",
"triggerID" : "788662635",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* 9c55937b18787dc4817c939be841554396cf8659 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13972) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-785063045
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699",
"triggerID" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"triggerType" : "PUSH"
}, {
"hash" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13844",
"triggerID" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924",
"triggerID" : "9c55937b18787dc4817c939be841554396cf8659",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948",
"triggerID" : "788003325",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924",
"triggerID" : "788003325",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13972",
"triggerID" : "788662635",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948",
"triggerID" : "788662635",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14004",
"triggerID" : "788945201",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* 9c55937b18787dc4817c939be841554396cf8659 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13972) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14004)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-785063045
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699",
"triggerID" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"triggerType" : "PUSH"
}, {
"hash" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13844",
"triggerID" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924",
"triggerID" : "9c55937b18787dc4817c939be841554396cf8659",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948",
"triggerID" : "788003325",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924",
"triggerID" : "788003325",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13972",
"triggerID" : "788662635",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* 9c55937b18787dc4817c939be841554396cf8659 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13972)
<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
[GitHub] [flink] LadyForest commented on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
LadyForest commented on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-785485000
@wuchong could you help review this PR when you are free?
----------------------------------------------------------------
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
[GitHub] [flink] flinkbot edited a comment on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-785063045
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699",
"triggerID" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"triggerType" : "PUSH"
}, {
"hash" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13844",
"triggerID" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924",
"triggerID" : "9c55937b18787dc4817c939be841554396cf8659",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948",
"triggerID" : "788003325",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* 9c55937b18787dc4817c939be841554396cf8659 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-785063045
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699",
"triggerID" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"triggerType" : "PUSH"
}, {
"hash" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13844",
"triggerID" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699)
* cbad0c65b28f29c61d4fa405f252640561f2b30d Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13844)
<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
[GitHub] [flink] wuchong commented on a change in pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #15005:
URL: https://github.com/apache/flink/pull/15005#discussion_r584435518
##########
File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/api/TableEnvironmentTest.scala
##########
@@ -592,6 +593,66 @@ class TableEnvironmentTest {
tableEnv.executeSql("UNLOAD MODULE dummy")
}
+ @Test
+ def testExecuteSqlWithUseModules(): Unit = {
+ tableEnv.executeSql("LOAD MODULE dummy")
+ assert(tableEnv.listModules().sameElements(Array[String]("core", "dummy")))
Review comment:
`assertArrayEquals` should work in Java, but yes it's hard to use in Scala. Comparing array's element one by one looks messing and not readable. I just checked `sameElements` takes order into account. Thus, I think it's fine to use `sameElements` here.
----------------------------------------------------------------
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
[GitHub] [flink] flinkbot edited a comment on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-785063045
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699",
"triggerID" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"triggerType" : "PUSH"
}, {
"hash" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13844",
"triggerID" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924",
"triggerID" : "9c55937b18787dc4817c939be841554396cf8659",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948",
"triggerID" : "788003325",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924",
"triggerID" : "788003325",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* 9c55937b18787dc4817c939be841554396cf8659 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-785063045
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699",
"triggerID" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"triggerType" : "PUSH"
}, {
"hash" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13844",
"triggerID" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924",
"triggerID" : "9c55937b18787dc4817c939be841554396cf8659",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948",
"triggerID" : "788003325",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924",
"triggerID" : "788003325",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* 9c55937b18787dc4817c939be841554396cf8659 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924)
<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
[GitHub] [flink] LadyForest commented on a change in pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
LadyForest commented on a change in pull request #15005:
URL: https://github.com/apache/flink/pull/15005#discussion_r583694458
##########
File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/calcite/FlinkPlannerImpl.scala
##########
@@ -36,11 +35,11 @@ import org.apache.calcite.sql.validate.SqlValidator
import org.apache.calcite.sql.{SqlExplain, SqlKind, SqlNode, SqlOperatorTable}
import org.apache.calcite.sql2rel.{SqlRexConvertletTable, SqlToRelConverter}
import org.apache.calcite.tools.{FrameworkConfig, RelConversionException}
+import org.apache.flink.sql.parser.ddl.SqlUseModules
Review comment:
Thanks a lot! Blame on me, and I was surprised that scala checkstyle config doesn't check on import order... will keep in mind that optimizing import next time :)
----------------------------------------------------------------
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
[GitHub] [flink] flinkbot edited a comment on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-785063045
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699",
"triggerID" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"triggerType" : "PUSH"
}, {
"hash" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13844",
"triggerID" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "9c55937b18787dc4817c939be841554396cf8659",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* cbad0c65b28f29c61d4fa405f252640561f2b30d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13844)
* 9c55937b18787dc4817c939be841554396cf8659 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
[GitHub] [flink] flinkbot edited a comment on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-785063045
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699",
"triggerID" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"triggerType" : "PUSH"
}, {
"hash" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13844",
"triggerID" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924",
"triggerID" : "9c55937b18787dc4817c939be841554396cf8659",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948",
"triggerID" : "788003325",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924",
"triggerID" : "788003325",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13972",
"triggerID" : "788662635",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948",
"triggerID" : "788662635",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14004",
"triggerID" : "788945201",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13972",
"triggerID" : "788945201",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* 9c55937b18787dc4817c939be841554396cf8659 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14004) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13972)
<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
[GitHub] [flink] LadyForest commented on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
LadyForest commented on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-789380350
Hi @wuchong, since CI passed, I'd like to know if there are any suggestions or concerns towards this PR?
----------------------------------------------------------------
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
[GitHub] [flink] LadyForest commented on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
LadyForest commented on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-788003325
@flinkbot run azure
----------------------------------------------------------------
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
[GitHub] [flink] flinkbot edited a comment on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-785063045
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699",
"triggerID" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"triggerType" : "PUSH"
}, {
"hash" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13844",
"triggerID" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924",
"triggerID" : "9c55937b18787dc4817c939be841554396cf8659",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* cbad0c65b28f29c61d4fa405f252640561f2b30d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13844)
* 9c55937b18787dc4817c939be841554396cf8659 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924)
<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
[GitHub] [flink] wuchong merged pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
wuchong merged pull request #15005:
URL: https://github.com/apache/flink/pull/15005
----------------------------------------------------------------
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
[GitHub] [flink] flinkbot edited a comment on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-785063045
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699",
"triggerID" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"triggerType" : "PUSH"
}, {
"hash" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13844",
"triggerID" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924",
"triggerID" : "9c55937b18787dc4817c939be841554396cf8659",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 9c55937b18787dc4817c939be841554396cf8659 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924)
<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
[GitHub] [flink] LadyForest commented on a change in pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
LadyForest commented on a change in pull request #15005:
URL: https://github.com/apache/flink/pull/15005#discussion_r583425121
##########
File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/api/TableEnvironmentTest.scala
##########
@@ -592,6 +593,66 @@ class TableEnvironmentTest {
tableEnv.executeSql("UNLOAD MODULE dummy")
}
+ @Test
+ def testExecuteSqlWithUseModules(): Unit = {
+ tableEnv.executeSql("LOAD MODULE dummy")
+ assert(tableEnv.listModules().sameElements(Array[String]("core", "dummy")))
Review comment:
+1 to check order.
While JUnit `Assert#assertArrayEquals` does not accept string arrays. So I guess either we cast to object or compare array's element one by one.
----------------------------------------------------------------
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
[GitHub] [flink] flinkbot commented on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-785055645
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 a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9 (Wed Feb 24 12:55:50 UTC 2021)
**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
[GitHub] [flink] flinkbot edited a comment on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-785063045
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699",
"triggerID" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-785063045
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699",
"triggerID" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-785063045
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699",
"triggerID" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"triggerType" : "PUSH"
}, {
"hash" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699)
* cbad0c65b28f29c61d4fa405f252640561f2b30d 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
[GitHub] [flink] flinkbot edited a comment on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-785063045
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699",
"triggerID" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"triggerType" : "PUSH"
}, {
"hash" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13844",
"triggerID" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924",
"triggerID" : "9c55937b18787dc4817c939be841554396cf8659",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948",
"triggerID" : "788003325",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924",
"triggerID" : "788003325",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13972",
"triggerID" : "788662635",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948",
"triggerID" : "788662635",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* 9c55937b18787dc4817c939be841554396cf8659 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13972) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948)
<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
[GitHub] [flink] wuchong commented on a change in pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #15005:
URL: https://github.com/apache/flink/pull/15005#discussion_r582530305
##########
File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/calcite/FlinkPlannerImpl.scala
##########
@@ -36,11 +35,11 @@ import org.apache.calcite.sql.validate.SqlValidator
import org.apache.calcite.sql.{SqlExplain, SqlKind, SqlNode, SqlOperatorTable}
import org.apache.calcite.sql2rel.{SqlRexConvertletTable, SqlToRelConverter}
import org.apache.calcite.tools.{FrameworkConfig, RelConversionException}
+import org.apache.flink.sql.parser.ddl.SqlUseModules
Review comment:
Please reorder the imports.
##########
File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/api/TableEnvironmentTest.scala
##########
@@ -33,6 +33,7 @@ import org.apache.flink.types.Row
import org.apache.calcite.plan.RelOptUtil
import org.apache.calcite.sql.SqlExplainLevel
import org.apache.flink.core.testutils.FlinkMatchers.containsMessage
+import org.apache.flink.table.module.ModuleEntry
Review comment:
Please reorder the imports.
##########
File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/api/TableEnvironmentTest.scala
##########
@@ -592,6 +593,66 @@ class TableEnvironmentTest {
tableEnv.executeSql("UNLOAD MODULE dummy")
}
+ @Test
+ def testExecuteSqlWithUseModules(): Unit = {
+ tableEnv.executeSql("LOAD MODULE dummy")
+ assert(tableEnv.listModules().sameElements(Array[String]("core", "dummy")))
Review comment:
Personally, I don't like Scala `assert` because it doesn't provide mismatch information when assertion failed. Besides, `sameElements` sounds like it doesn't care about the elements order, but the order is critical here. Therefore, it would be better to use `assertArrayEquals`. We may also need to update the tests added in previous PR.
##########
File path: flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/LocalExecutor.java
##########
@@ -428,6 +429,13 @@ public ProgramTargetDescriptor executeUpdate(String sessionId, String statement)
return executeUpdateInternal(sessionId, context, statement);
}
+ @VisibleForTesting
+ List<ModuleEntry> listFullModules(String sessionId) throws SqlExecutionException {
Review comment:
I think we will need this interface in the next `SHOW FULL MODULES` PR, we can add this method into base interface and implement it beside `listModules`.
##########
File path: flink-table/flink-sql-parser-hive/src/main/codegen/data/Parser.tdd
##########
@@ -129,6 +130,7 @@
"LINES"
"LOAD"
"LOCATION"
+ "MODULES"
Review comment:
We should also add `MODULES` into non-reserved-keywords, otherwise it will break user jobs which uses `modules` as column name. For example, `select a, b, modules from T` will parse failed.
----------------------------------------------------------------
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
[GitHub] [flink] LadyForest commented on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
LadyForest commented on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-788662635
@flinkbot run azure
----------------------------------------------------------------
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
[GitHub] [flink] LadyForest commented on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
LadyForest commented on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-788945201
The CI keeps failing due to all sorts of timeout :(
@flinkbot run azure
----------------------------------------------------------------
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
[GitHub] [flink] flinkbot edited a comment on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-785063045
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699",
"triggerID" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"triggerType" : "PUSH"
}, {
"hash" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13844",
"triggerID" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924",
"triggerID" : "9c55937b18787dc4817c939be841554396cf8659",
"triggerType" : "PUSH"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948",
"triggerID" : "788003325",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924",
"triggerID" : "788003325",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13972",
"triggerID" : "788662635",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948",
"triggerID" : "788662635",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14004",
"triggerID" : "788945201",
"triggerType" : "MANUAL"
}, {
"hash" : "9c55937b18787dc4817c939be841554396cf8659",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13972",
"triggerID" : "788945201",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* 9c55937b18787dc4817c939be841554396cf8659 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13924) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13948) Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=14004) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13972)
<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
[GitHub] [flink] flinkbot edited a comment on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-785063045
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13699",
"triggerID" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"triggerType" : "PUSH"
}, {
"hash" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13844",
"triggerID" : "cbad0c65b28f29c61d4fa405f252640561f2b30d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* cbad0c65b28f29c61d4fa405f252640561f2b30d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13844)
<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
[GitHub] [flink] LadyForest commented on a change in pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
LadyForest commented on a change in pull request #15005:
URL: https://github.com/apache/flink/pull/15005#discussion_r582802303
##########
File path: flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/LocalExecutor.java
##########
@@ -428,6 +429,13 @@ public ProgramTargetDescriptor executeUpdate(String sessionId, String statement)
return executeUpdateInternal(sessionId, context, statement);
}
+ @VisibleForTesting
+ List<ModuleEntry> listFullModules(String sessionId) throws SqlExecutionException {
Review comment:
Hi Jark, I've also considered this point before issuing this PR.
I thought the reason we have this method `LocalExecutor#listModules()` is because the `SHOW MODULES` syntax is not supported by the `FlinkSqlParserImpl`and `TableEnvironment` at that moment. Thus we cannot perform `localExecutor.executeSql("SHOW MODULES")`.
Once the `SHOW [FULL] MODULES` syntax is supported, all `SHOW MODULES` commands would go for the table result (except for `SHOW MODULES` using the old planner). That's why I didn't make `listFullModules()` an interface method. I was meant to make it a testing method.
Towards the next PR, since `SHOW FULL MODULES` will display the module's use status, `TableSchema` is needed for the result and print as tableau form. The extra effort will be put in if calling `localExecutor.listFullModules()` directly. However, we can reuse `PrintUtils#printAsTableauForm` if using `localExecutor.executeSql("SHOW FULL MODULES")`.
Please correct me if I miss something or not understand wrong:-)
----------------------------------------------------------------
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
[GitHub] [flink] LadyForest commented on a change in pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
LadyForest commented on a change in pull request #15005:
URL: https://github.com/apache/flink/pull/15005#discussion_r582786889
##########
File path: flink-table/flink-sql-parser-hive/src/main/codegen/data/Parser.tdd
##########
@@ -129,6 +130,7 @@
"LINES"
"LOAD"
"LOCATION"
+ "MODULES"
Review comment:
Hi Jark, this is the point I've struggled with. The `USE database` syntax takes a compound identifier for the database name, and the non-reserved keyword will be matched and cause a parse failure.
The grammar for `USE db`
```
SqlUseDatabase SqlUseDatabase() :
{
SqlIdentifier databaseName;
SqlParserPos pos;
}
{
<USE> { pos = getPos();}
databaseName = CompoundIdentifier()
{
return new SqlUseDatabase(pos, databaseName);
}
}
```
The grammar for `IdentiiferSegment` of `CompoundIdentifier`
```
void IdentifierSegment(List<String> names, List<SqlParserPos> positions) :
{
final String id;
char unicodeEscapeChar = BACKSLASH;
final SqlParserPos pos;
final Span span;
}
{
(
<IDENTIFIER> {
...
}
|
<HYPHENATED_IDENTIFIER> {
...
}
|
<QUOTED_IDENTIFIER> {
...
}
|
<BACK_QUOTED_IDENTIFIER> {
...
}
|
<BRACKET_QUOTED_IDENTIFIER> {
...
}
|
<UNICODE_QUOTED_IDENTIFIER> {
...
}
[
<UESCAPE> <QUOTED_STRING> {
...
}
]
{
...
}
|
id = NonReservedKeyWord() {
pos = getPos();
}
)
...
}
```
You can check the parser.jj template or generated parser.jj file to identify it, and I'm open to your suggestions
----------------------------------------------------------------
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
[GitHub] [flink] flinkbot commented on pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #15005:
URL: https://github.com/apache/flink/pull/15005#issuecomment-785063045
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* a0fcb9ebbca2b12a13b185cd48c0df7a63f77aa9 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
[GitHub] [flink] wuchong commented on a change in pull request #15005: [FLINK-21298][table] Support 'USE MODULES' syntax both in SQL parser, TableEnvironment and SQL CLI
Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #15005:
URL: https://github.com/apache/flink/pull/15005#discussion_r584432452
##########
File path: flink-table/flink-sql-parser-hive/src/main/codegen/data/Parser.tdd
##########
@@ -129,6 +130,7 @@
"LINES"
"LOAD"
"LOCATION"
+ "MODULES"
Review comment:
Thanks. Then we should warn users this is a reserved keyword now. I will add this information into release note once PR is merged.
`The term MODULES is a reserved keyword now. Use backticks to escape column names and other identifiers with this name.`
----------------------------------------------------------------
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