This is an automated email from the ASF dual-hosted git repository.

andygrove pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-comet.git


The following commit(s) were added to refs/heads/main by this push:
     new bdd4b90b49 test: name the whole dispatched subtree in the decimal 
promotion assertion (#5849)
bdd4b90b49 is described below

commit bdd4b90b49751b2ffedbddf87805b5f6311e9dfa
Author: Andy Grove <[email protected]>
AuthorDate: Thu Sep 10 14:55:33 2026 -0600

    test: name the whole dispatched subtree in the decimal promotion assertion 
(#5849)
    
    #5610 started recording every expression in a dispatched subtree rather
    than only its root, on the grounds that the whole subtree is bound into
    the one kernel and so all of it ran in the JVM. It regenerated the q78
    plan-stability goldens for that change but left this assertion expecting
    `hypot` alone, so the `[expressions]` job has failed on all five Spark
    profiles since.
    
    Expect the promoted subtree's names: `hypot`, its `cast`, the
    `checkoverflow` wrapper promotion adds around the decimal `add`, and the
    `add` itself.
    
    Closes #5848
    
    
    Claude-Session: https://claude.ai/code/session_01BtAqq4YJsk8uk42c7vHk8B
    
    Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
---
 .../src/test/scala/org/apache/comet/CometCodegenSuite.scala  | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/spark/src/test/scala/org/apache/comet/CometCodegenSuite.scala 
b/spark/src/test/scala/org/apache/comet/CometCodegenSuite.scala
index f148216092..5c1f957453 100644
--- a/spark/src/test/scala/org/apache/comet/CometCodegenSuite.scala
+++ b/spark/src/test/scala/org/apache/comet/CometCodegenSuite.scala
@@ -422,13 +422,21 @@ class CometCodegenSuite
 
     // Promotion rebuilds Hypot as well as the Alias above it. Unlike the 
original Add, the
     // dispatched copy is not reachable from the original tree, so only the 
coverage lift can
-    // bring its name back to the projection owner.
+    // bring its names back to the projection owner.
+    //
+    // Every expression in the rebuilt subtree is named, not just the 
dispatched root: the whole
+    // subtree was bound into the one kernel, so all of it ran in the JVM. 
`checkoverflow` is the
+    // wrapper promotion added around the decimal `Add`, which is what makes 
the lifted set
+    // evidence that the promoted copy, rather than the original tree, was the 
one recorded.
     val proto = QueryPlanSerde.exprToProto(projection, Seq(decimal)).get
     assert(proto.hasJvmScalarUdf)
     assert(proto.getJvmScalarUdf.getClassName === 
classOf[CometScalaUDFCodegen].getName)
     assert(dispatched.getTagValue(CometExplainInfo.DISPATCHED_SELF).isEmpty)
     
assert(dispatched.getTagValue(CometExplainInfo.CODEGEN_DISPATCH_EXPRS).isEmpty)
-    
assert(projection.getTagValue(CometExplainInfo.CODEGEN_DISPATCH_EXPRS).contains(Set("hypot")))
+    assert(
+      projection
+        .getTagValue(CometExplainInfo.CODEGEN_DISPATCH_EXPRS)
+        .contains(Set("hypot", "cast", "checkoverflow", "add")))
   }
 
   test("tags copied onto the shared TrueLiteral do not leak into unrelated 
plans") {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to