andygrove commented on code in PR #3732:
URL: https://github.com/apache/datafusion-comet/pull/3732#discussion_r2965814519
##########
spark/src/main/scala/org/apache/comet/serde/datetime.scala:
##########
@@ -586,3 +586,22 @@ object CometDateFormat extends
CometExpressionSerde[DateFormatClass] {
}
}
}
+
+object CometPreciseTimestampConversion extends
CometExpressionSerde[PreciseTimestampConversion] {
+ override def getSupportLevel(expr: PreciseTimestampConversion): SupportLevel
= {
+ (expr.fromType, expr.toType) match {
+ case (TimestampType, LongType) | (LongType, TimestampType) =>
+ Compatible()
+ case _ =>
+ Unsupported(Some(s"PreciseTimestampConversion from ${expr.fromType} to
${expr.toType}"))
+ }
+ }
+
+ override def convert(
+ expr: PreciseTimestampConversion,
+ inputs: Seq[Attribute],
+ binding: Boolean): Option[ExprOuterClass.Expr] = {
+ // Both types are i64 micros in Arrow, so no conversion needed — return
child directly.
+ exprToProtoInternal(expr.child, inputs, binding)
Review Comment:
👍
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]