matriv commented on a change in pull request #18572:
URL: https://github.com/apache/flink/pull/18572#discussion_r795782895



##########
File path: 
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/ExecNodeGraphValidator.java
##########
@@ -0,0 +1,50 @@
+/*
+ * 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.plan.nodes.exec;
+
+import org.apache.flink.table.api.ValidationException;
+import org.apache.flink.table.planner.plan.nodes.exec.serde.JsonSerdeUtil;
+import 
org.apache.flink.table.planner.plan.nodes.exec.stream.StreamExecLookupJoin;
+import 
org.apache.flink.table.planner.plan.nodes.exec.visitor.AbstractExecNodeExactlyOnceVisitor;
+
+/** This class validates the {@link ExecNodeGraph}. */
+public class ExecNodeGraphValidator extends AbstractExecNodeExactlyOnceVisitor 
{
+
+    @Override
+    protected void visitNode(ExecNode<?> node) {
+        // TODO should we keep this? It seems like it's just checking that the 
nodes are correctly
+        //  developed by us...
+        if (!JsonSerdeUtil.hasJsonCreatorAnnotation(node.getClass())) {
+            throw new ValidationException(
+                    String.format(
+                            "%s does not implement @JsonCreator annotation on 
constructor.",
+                            node.getClass().getCanonicalName()));
+        }
+        if (node instanceof StreamExecLookupJoin) {
+            // TODO Does this validation makes sense?
+            //  Is more reasonable to just make sure that a 
TemporalTableSourceSpec cannot be
+            //  instantiated without a DynamicTableSourceSpec?

Review comment:
       I have already moved this to the new `ExecNodeMetadataUtil`: 
StreamExecLookupJoin




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

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to