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

agrove 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 11651d422 fix: Passthrough condition in StaticInvoke case block (#1392)
11651d422 is described below

commit 11651d422197015250d939803e470bb805e1fc82
Author: Emily Matheys <[email protected]>
AuthorDate: Thu Feb 13 01:45:41 2025 +0200

    fix: Passthrough condition in StaticInvoke case block (#1392)
    
    * fix invalid evaluation
    
    * update comment
    
    ---------
    
    Co-authored-by: Emily Matheys <[email protected]>
---
 spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala 
b/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala
index 9ce6ea9c2..3f3ae5fbf 100644
--- a/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala
+++ b/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala
@@ -2128,7 +2128,9 @@ object QueryPlanSerde extends Logging with 
ShimQueryPlanSerde with CometExprShim
       // char types.
       // See https://github.com/apache/spark/pull/38151
       case s: StaticInvoke
-          if s.staticObject.isInstanceOf[Class[CharVarcharCodegenUtils]] &&
+          // classOf gets ther runtime class of T, which lets us compare 
directly
+          // Otherwise isInstanceOf[Class[T]] will always evaluate to true for 
Class[_]
+          if s.staticObject == classOf[CharVarcharCodegenUtils] &&
             s.dataType.isInstanceOf[StringType] &&
             s.functionName == "readSidePadding" &&
             s.arguments.size == 2 &&


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

Reply via email to