Github user yjshen commented on a diff in the pull request:
https://github.com/apache/flink/pull/1916#discussion_r61382801
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/TableEnvironment.scala
---
@@ -355,4 +380,26 @@ object TableEnvironment {
new ScalaStreamTableEnv(executionEnvironment, tableConfig)
}
+ /**
+ * The primary workflow for executing plan validation for that
generated from Table API.
+ * The validation is intentionally designed as a lazy procedure and
triggered when we
+ * are going to run on Flink core.
+ */
+ class PlanPreparation(val env: TableEnvironment, val logical:
LogicalNode) {
+
+ lazy val resolvedPlan: LogicalNode = env.getValidator.resolve(logical)
+
+ def validate(): Unit = env.getValidator.validate(resolvedPlan)
+
+ lazy val relNode: RelNode = {
+ env match {
+ case _: BatchTableEnvironment =>
--- End diff --
Yes, it shouldn't be distinguished. The difference should exist inside
validator's rule set.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---