andygrove commented on code in PR #1687: URL: https://github.com/apache/datafusion-comet/pull/1687#discussion_r2093684993
########## native/core/src/parquet/parquet_support.rs: ########## @@ -171,7 +178,36 @@ fn cast_array( .with_timezone(Arc::clone(tz)), )) } - _ => Ok(cast_with_options(&array, to_type, &PARQUET_OPTIONS)?), + // If Arrow cast supports the cast, delegate the cast to Arrow + _ if can_cast_types(from_type, to_type) => { + Ok(cast_with_options(&array, to_type, &PARQUET_OPTIONS)?) + } + _ => Ok(array), + } +} + +fn cast_list_to_list( + array: &ListArray, + from_type: &DataType, + to_type: &DataType, + parquet_options: &SparkParquetOptions, +) -> DataFusionResult<ArrayRef> { + match (from_type, to_type) { + (DataType::List(_), DataType::List(to_inner_type)) => { + let cast_field = cast_array( Review Comment: This will recurse back into `cast_array` where we have the special handling for casting struct-to-struct :+1: -- 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-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org