Weijun-H commented on code in PR #6654:
URL: https://github.com/apache/arrow-datafusion/pull/6654#discussion_r1242712961
##########
datafusion/physical-expr/src/datetime_expressions.rs:
##########
@@ -827,7 +912,7 @@ mod tests {
(
"2020-09-08T13:42:29.190855Z",
"second",
- "2020-09-08T13:42:29.000000Z",
+ "2020-09-08T13:42:29.190855Z",
Review Comment:
https://github.com/apache/arrow-datafusion/blob/b17cf0710938eed1c9f7794d5695bfac89bff580/datafusion/physical-expr/src/datetime_expressions.rs#L217-L223
Previously, the truncation of timestamps to seconds occurred prematurely in
`date_trunc_single`, resulting in inaccurate results. Therefore, I have made
the necessary adjustments and deferred the logic to the `_date_trunc` function.
By implementing this change, the granularity of the timestamps is preserved,
and truncation is performed at a later stage to ensure accuracy.
--
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]