What is the problem the feature request solves?
toPhysical in the Delta contrib duplicates createPhysicalSchema and the name-mode field-id stripping that DeltaParquetFileFormat.prepareSchemaForRead already implements in every supported Delta version.
Describe the potential solution
Delegate to prepareSchemaForRead with the generated bookkeeping columns excluded, and keep a clear division between the physical read schemas and the logical output types in common.fields so native output adaptation can restore logical nested types before parent expressions run, with mapped complex predicates staying residual until they bind safely to the physical schema. The current ID-mode and mapped-nested fallbacks stay until that adaptation exists. Useful controls: upgrade and rename, to_json of mapped structs, missing nested children, and version-specific null-struct behavior; #5661 documents the support boundary.
Additional context
Raised in the #5365 review (item 9); filed as a follow-up.
What is the problem the feature request solves?
toPhysicalin the Delta contrib duplicatescreatePhysicalSchemaand the name-mode field-id stripping thatDeltaParquetFileFormat.prepareSchemaForReadalready implements in every supported Delta version.Describe the potential solution
Delegate to
prepareSchemaForReadwith the generated bookkeeping columns excluded, and keep a clear division between the physical read schemas and the logical output types incommon.fieldsso native output adaptation can restore logical nested types before parent expressions run, with mapped complex predicates staying residual until they bind safely to the physical schema. The current ID-mode and mapped-nested fallbacks stay until that adaptation exists. Useful controls: upgrade and rename,to_jsonof mapped structs, missing nested children, and version-specific null-struct behavior; #5661 documents the support boundary.Additional context
Raised in the #5365 review (item 9); filed as a follow-up.