You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "andygrove (via GitHub)" <gi...@apache.org> on 2026/01/30 18:38:14 UTC
Re: [PR] fix: hour/minute/second handling for TimestampNTZ [datafusion-comet]
andygrove commented on code in PR #3265:
URL: https://github.com/apache/datafusion-comet/pull/3265#discussion_r2747501545
##########
native/spark-expr/src/datetime_funcs/extract_date_part.rs:
##########
@@ -75,14 +76,28 @@ macro_rules! extract_date_part {
match args {
[ColumnarValue::Array(array)] => {
- let array = array_with_timezone(
- array,
- self.timezone.clone(),
- Some(&DataType::Timestamp(
- Microsecond,
- Some(self.timezone.clone().into()),
- )),
- )?;
+ let array = match array.data_type() {
+ // TimestampNTZ → DO NOT apply timezone conversion
+ DataType::Timestamp(_, None) => array.clone(),
+
+ // Timestamp with timezone → convert from UTC to session timezone
+ DataType::Timestamp(_, Some(_)) => array_with_timezone(
+ array,
Review Comment:
@vigneshsiva11 this is a valid concern
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org