This is an automated email from the ASF dual-hosted git repository.
mbutrovich 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 c91036e54 fix: CometLiteral class cast exception with arrays (#2718)
c91036e54 is described below
commit c91036e54c58dd78fd4c1fa7ead23c791e1f1c4e
Author: Andy Grove <[email protected]>
AuthorDate: Thu Nov 6 16:45:26 2025 -0700
fix: CometLiteral class cast exception with arrays (#2718)
---
spark/src/main/scala/org/apache/comet/serde/literals.scala | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/spark/src/main/scala/org/apache/comet/serde/literals.scala
b/spark/src/main/scala/org/apache/comet/serde/literals.scala
index 312f12a4c..e24b55449 100644
--- a/spark/src/main/scala/org/apache/comet/serde/literals.scala
+++ b/spark/src/main/scala/org/apache/comet/serde/literals.scala
@@ -23,7 +23,7 @@ import java.lang
import org.apache.spark.internal.Logging
import org.apache.spark.sql.catalyst.expressions.{Attribute, Literal}
-import org.apache.spark.sql.catalyst.util.GenericArrayData
+import org.apache.spark.sql.catalyst.util.ArrayData
import org.apache.spark.sql.types.{ArrayType, BinaryType, BooleanType,
ByteType, DateType, Decimal, DecimalType, DoubleType, FloatType, IntegerType,
LongType, NullType, ShortType, StringType, TimestampNTZType, TimestampType}
import org.apache.spark.unsafe.types.UTF8String
@@ -92,7 +92,7 @@ object CometLiteral extends CometExpressionSerde[Literal]
with Logging {
case arr: ArrayType =>
val listLiteralBuilder: ListLiteral.Builder =
- makeListLiteral(value.asInstanceOf[GenericArrayData].array, arr)
+ makeListLiteral(value.asInstanceOf[ArrayData].array, arr)
exprBuilder.setListVal(listLiteralBuilder.build())
exprBuilder.setDatatype(serializeDataType(dataType).get)
case dt =>
@@ -198,7 +198,7 @@ object CometLiteral extends CometExpressionSerde[Literal]
with Logging {
})
case a: ArrayType =>
array.foreach(v => {
- val casted = v.asInstanceOf[GenericArrayData]
+ val casted = v.asInstanceOf[ArrayData]
listLiteralBuilder.addListValues(if (casted != null) {
makeListLiteral(casted.array, a)
} else ListLiteral.newBuilder())
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]