mihaibudiu commented on code in PR #4641:
URL: https://github.com/apache/calcite/pull/4641#discussion_r2539206953
##########
core/src/test/java/org/apache/calcite/test/RelNodeVisitCoverageTest.java:
##########
@@ -0,0 +1,75 @@
+package org.apache.calcite.test;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import io.github.classgraph.ClassGraph;
+import io.github.classgraph.ClassInfo;
+import io.github.classgraph.ScanResult;
+
+import org.apache.calcite.rel.RelNode;
+import org.apache.calcite.rel.RelShuttle;
+
+import org.junit.jupiter.api.Test;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.stream.Collectors;
+
+/**
+ * Discovers every concrete {@link RelNode} implementation on the classpath and
+ * verifies {@link RelShuttle} declares a compatible {@code visit} method.
Review Comment:
verifies whether
##########
core/src/test/java/org/apache/calcite/test/RelNodeVisitCoverageTest.java:
##########
@@ -0,0 +1,75 @@
+package org.apache.calcite.test;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import io.github.classgraph.ClassGraph;
+import io.github.classgraph.ClassInfo;
+import io.github.classgraph.ScanResult;
+
+import org.apache.calcite.rel.RelNode;
+import org.apache.calcite.rel.RelShuttle;
+
+import org.junit.jupiter.api.Test;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.stream.Collectors;
+
+/**
+ * Discovers every concrete {@link RelNode} implementation on the classpath and
+ * verifies {@link RelShuttle} declares a compatible {@code visit} method.
+ */
+class RelNodeVisitCoverageTest {
+
+ @Test void relShuttleCoversAllRelNodes() {
Review Comment:
so what's the result of the test?
The JavaDoc of the base shuttle should probably list the rules for a class
to be visited; otherwise we will be arguing forever.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]