viirya commented on code in PR #27754:
URL: https://github.com/apache/datafusion/pull/27754#discussion_r4703026059


##########
datafusion/datasource-parquet/src/schema_coercion.rs:
##########
@@ -16,9 +16,10 @@
 //! build the string array itself. It only validates UTF-8 for columns carrying
 //! the `UTF8` logical annotation, which such a column by definition does not,
 //! so invalid bytes surface as an invalid string array rather than an error.
-//! That is long-standing behaviour for top-level and struct fields; it is not
-//! extended to map children, whose positional matching is newer, so binary map
-//! values keep going through the validating cast instead.
+//! This coercion therefore only applies to top-level fields, where it is
+//! long-standing behaviour. Nested binary fields (struct fields, list elements
+//! and map keys and values) are never read as strings: they keep going through
+//! the validating cast instead. The view coercions still apply at every level.

Review Comment:
   These docs now say nested binary is never read as a string, but the 
`apply_file_schema_type_coercions` doc still says "The same coercions are 
applied recursively to nested types", and the `coerce_map_entries` doc still 
gives a map-specific reason that now applies to every nested field. Worth 
tidying both on `main` in a follow-up. Nothing to change in this backport.



-- 
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]

Reply via email to