parthchandra commented on code in PR #1387:
URL: https://github.com/apache/datafusion-comet/pull/1387#discussion_r1951907716
##########
native/core/src/parquet/parquet_support.rs:
##########
@@ -596,7 +595,10 @@ fn cast_array(
parquet_options: &SparkParquetOptions,
) -> DataFusionResult<ArrayRef> {
use DataType::*;
- let array = array_with_timezone(array, parquet_options.timezone.clone(),
Some(to_type))?;
+ let array = match to_type {
+ Timestamp(_, None) => array, // array_with_timezone does not support
to_type of NTZ.
+ _ => array_with_timezone(array, parquet_options.timezone.clone(),
Some(to_type))?,
Review Comment:
Can you log an issue to review the use of `array_with_timezone` ? The method
was written to cast timestamps provided by Spark while here we are casting
timestamps provided by Parquet and there might be subtle cases where the
behavior is different. As long as the unit tests pass, I believe we are safe
for all use cases, but it would be a good idea to review.
--
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]