martin-g commented on code in PR #3618:
URL: https://github.com/apache/datafusion-comet/pull/3618#discussion_r2877386467
##########
spark/src/main/scala/org/apache/comet/serde/datetime.scala:
##########
@@ -541,3 +541,52 @@ object CometDateFormat extends
CometExpressionSerde[DateFormatClass] {
}
}
}
+
+trait CommonDateTimeExprs {
+
+ def secondsOfTimeToProto(
+ expr: Expression,
+ inputs: Seq[Attribute],
+ binding: Boolean): Option[Expr] = {
+ val childOpt = expr.children.headOption.orElse {
+ withInfo(expr, "SecondsOfTime has no child expression")
+ None
+ }
+
+ childOpt.flatMap { child =>
+ val timeZoneId = {
+ val exprClass = expr.getClass
+ try {
+ val timeZoneIdMethod = exprClass.getMethod("timeZoneId")
Review Comment:
Could you please point me to the `def timeZoneId()` method or `timeZoneId`
field in SecondsOfTime in Spark. I fail to find them in any of the parent
classes/traits.
In addition maybe it would be good to add a cache and execute the reflection
just once.
--
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]