andygrove commented on code in PR #6740:
URL: https://github.com/apache/datafusion-comet/pull/6740#discussion_r4220364050
##########
native/spark-expr/src/datetime_funcs/timestamp_trunc.rs:
##########
@@ -41,20 +41,25 @@ pub struct TimestampTruncExpr {
/// `Arc<str>` so it can be cheaply cloned onto Arrow `Timestamp` data
types without
/// reallocating, and parsed once into a `chrono::TimeZone` per batch.
timezone: Arc<str>,
+ /// Whether SECOND and MILLISECOND truncation wraps below the smallest
timestamp, as Spark
+ /// did before 4.2.0, instead of raising `long overflow` as 4.2.0 does
(SPARK-56663).
Review Comment:
Yes. The serde sets the flag from `isSpark42Plus`, so 4.3 and later get the
checked behavior too. If a later release changes `truncTimestamp` again, that
needs its own shim either way. You're right that the comments read as if only
4.2 behaves this way. I've reworded them to "4.2 and later" in #6354, which
threads the same flag through the column-format path.
--
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]