comphead commented on code in PR #2795:
URL: https://github.com/apache/datafusion-comet/pull/2795#discussion_r2539198395
##########
spark/src/test/scala/org/apache/spark/sql/CometTestBase.scala:
##########
@@ -406,6 +408,26 @@ abstract class CometTestBase
None
}
+ // checks the plan node has no missing inputs
+ // such nodes represented in plan with exclamation mark !
+ // example: !CometWindowExec
+ protected def checkPlanNotMissingInput(plan: SparkPlan): Unit = {
+ def hasMissingInput(node: SparkPlan): Boolean = {
+ node.missingInput.nonEmpty && node.children.nonEmpty
+ }
+
+ val isCometNode = plan.nodeName.startsWith("Comet")
+
+ if (isCometNode && hasMissingInput(plan)) {
+ assert(false, s"Plan node `${plan.nodeName}` has invalid missingInput")
+ }
Review Comment:
Thanks @wForget I'm keeping it that way as other similar assertions 🤷
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]