kosiew commented on code in PR #22980:
URL: https://github.com/apache/datafusion/pull/22980#discussion_r3433443790
##########
datafusion/common/src/nested_struct.rs:
##########
@@ -264,6 +272,72 @@ fn cast_list_view_column<O: arrow::array::OffsetSizeTrait>(
Ok(Arc::new(result))
}
+fn cast_fixed_size_list_column(
+ source_col: &ArrayRef,
+ target_inner_field: &FieldRef,
+ target_list_size: i32,
+ cast_options: &CastOptions,
+) -> Result<ArrayRef> {
+ let source_list =
+ downcast_array!(source_col, FixedSizeListArray, "fixed-size list
array")?;
+
+ let source_values = source_list.values();
+ let target_type = target_inner_field.data_type();
+
+ validate_data_type_compatibility(
Review Comment:
This fixed-size-list path differs from the list/list-view paths because it
has a retry that masks child values hidden behind null parent list slots. The
schema compatibility check ensures that retry is only used for value-level
failures in hidden child positions, not to accidentally relax planner/runtime
type compatibility. The parity tests for incompatible nested type and missing
non-nullable fields cover this. I’ll add a comment or restructure the code so
this guard is explicit.
--
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]