Skip to content

Commit df7ad95

Browse files
committed
hash does not support timetype
1 parent 0e94d48 commit df7ad95

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • spark/src/main/scala/org/apache/comet/serde

spark/src/main/scala/org/apache/comet/serde/hash.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import org.apache.spark.sql.catalyst.expressions.{Attribute, Expression, Murmur3
2323
import org.apache.spark.sql.types.{ArrayType, DataType, DecimalType, IntegerType, LongType, MapType, StringType, StructType}
2424

2525
import org.apache.comet.CometSparkSessionExtensions.withInfo
26-
import org.apache.comet.serde.QueryPlanSerde.{exprToProtoInternal, scalarFunctionExprToProtoWithReturnType, serializeDataType, supportedDataType}
26+
import org.apache.comet.serde.QueryPlanSerde.{exprToProtoInternal, isTimeType, scalarFunctionExprToProtoWithReturnType, serializeDataType, supportedDataType}
2727

2828
object CometXxHash64 extends CometExpressionSerde[XxHash64] {
2929
override def convert(
@@ -126,6 +126,9 @@ private object HashUtils {
126126
isSupportedDataType(expr, a.elementType)
127127
case m: MapType =>
128128
isSupportedDataType(expr, m.keyType) && isSupportedDataType(expr, m.valueType)
129+
case dt if isTimeType(dt) =>
130+
withInfo(expr, s"Unsupported datatype $dt")
131+
false
129132
case _ if !supportedDataType(dt, allowComplex = true) =>
130133
withInfo(expr, s"Unsupported datatype $dt")
131134
false

0 commit comments

Comments
 (0)