comphead commented on code in PR #5786:
URL: https://github.com/apache/datafusion-comet/pull/5786#discussion_r4087771290
##########
native/core/src/parquet/schema_adapter.rs:
##########
@@ -810,6 +812,42 @@ fn check_conversion(
}
}
+/// A Comet cast is opaque to Parquet leaf clipping and decodes its entire
input subtree.
+/// Check physical byte-identical names, not requested-name resolution, before
that read.
+fn check_decoded_field_names(data_type: &DataType) -> DataFusionResult<()> {
+ match data_type {
+ DataType::Struct(fields) => {
+ let mut names = HashSet::with_capacity(fields.len());
+ for field in fields {
+ if !names.insert(field.name()) {
+ return Err(duplicate_parquet_field_error(field.name()));
+ }
+ check_decoded_field_names(field.data_type())?;
+ }
+ }
+ DataType::List(field)
+ | DataType::LargeList(field)
+ | DataType::FixedSizeList(field, _)
+ | DataType::ListView(field)
+ | DataType::LargeListView(field)
+ | DataType::Map(field, _) => {
Review Comment:
why `map.value` is not checked?
--
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]