twalthr commented on a change in pull request #15018:
URL: https://github.com/apache/flink/pull/15018#discussion_r588104850
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/delegation/BatchPlanner.scala
##########
@@ -169,4 +172,15 @@ class BatchPlanner(
override def explainJsonPlan(jsonPlan: String, extraDetails:
ExplainDetail*): String = {
throw new TableException("This method is not supported for batch planner
now.")
}
+
+ override def isSpecifiedPlanner(): Unit = {
+ super.isSpecifiedPlanner();
+ if (!config.getConfiguration.get(ExecutionOptions.RUNTIME_MODE)
+ .equals(RuntimeExecutionMode.BATCH)) {
+ throw new IllegalArgumentException("Expect STREAMING mode but get BATCH
mode. " +
Review comment:
Rename to: `Mismatch between configured planner and actual planner.
Currently, the 'execution.runtime-mode' can only be set when instantiating the
table environment. Subsequent changes are not supported. Please instatiate a
new TableEnvironment if necessary.`
`
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/delegation/BatchPlanner.scala
##########
@@ -169,4 +172,15 @@ class BatchPlanner(
override def explainJsonPlan(jsonPlan: String, extraDetails:
ExplainDetail*): String = {
throw new TableException("This method is not supported for batch planner
now.")
}
+
+ override def isSpecifiedPlanner(): Unit = {
+ super.isSpecifiedPlanner();
+ if (!config.getConfiguration.get(ExecutionOptions.RUNTIME_MODE)
+ .equals(RuntimeExecutionMode.BATCH)) {
+ throw new IllegalArgumentException("Expect STREAMING mode but get BATCH
mode. " +
Review comment:
Also make it a `TableException` and update the other locations.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]