This is an automated email from the ASF dual-hosted git repository. changchen pushed a commit to branch feature/41 in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
commit 851a222f72317100db02863fce76fcd2aa16b02c Author: Chang chen <[email protected]> AuthorDate: Wed Dec 31 11:35:10 2025 +0800 [Fix] Use class name instead of class object for streaming call detection to ensure Spark 4.1 compatibility. see https://github.com/apache/spark/pull/51477 --- .../scala/org/apache/gluten/extension/caller/CallerInfo.scala | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gluten-core/src/main/scala/org/apache/gluten/extension/caller/CallerInfo.scala b/gluten-core/src/main/scala/org/apache/gluten/extension/caller/CallerInfo.scala index 732c898285..7dfaaaa774 100644 --- a/gluten-core/src/main/scala/org/apache/gluten/extension/caller/CallerInfo.scala +++ b/gluten-core/src/main/scala/org/apache/gluten/extension/caller/CallerInfo.scala @@ -18,7 +18,7 @@ package org.apache.gluten.extension.caller import org.apache.spark.sql.execution.adaptive.AdaptiveSparkPlanExec import org.apache.spark.sql.execution.columnar.InMemoryRelation -import org.apache.spark.sql.execution.streaming.StreamExecution +import org.apache.spark.util.SparkVersionUtil /** * Helper API that stores information about the call site of the columnar rule. Specific columnar @@ -70,7 +70,12 @@ object CallerInfo { } private def inStreamingCall(stack: Seq[StackTraceElement]): Boolean = { - stack.exists(_.getClassName.equals(StreamExecution.getClass.getName.split('$').head)) + val streamName = if (SparkVersionUtil.gteSpark41) { + "org.apache.spark.sql.execution.streaming.runtime.StreamExecution" + } else { + "org.apache.spark.sql.execution.streaming.StreamExecution" + } + stack.exists(_.getClassName.equals(streamName)) } private def inBloomFilterStatFunctionCall(stack: Seq[StackTraceElement]): Boolean = { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
