adiranjan25 opened a new pull request, #19207:
URL: https://github.com/apache/iceberg/pull/19207

   Addresses #19192.
   
   ## Problem
   
   Spark changelog queries can return incorrectly ordered metadata
   or throw ClassCastException when selecting a subset of changelog
   columns or combining changelog and regular metadata columns.
   
   ## Root cause
   
   ChangelogRowReader appends a fixed changelog metadata row
   without projecting the assembled row into the expected schema.
   
   ## Proposed fix
   
   Construct the joined schema and project the assembled row
   into the expected schema using Iceberg field IDs.
   
   Update existing reader tests to explicitly request the
   changelog metadata they expect.
   
   ## Validation
   
   - Reproduced four failing regression cases on upstream main.
   - Targeted Spark 3.5 reader and SQL regression tests passed
     after the proposed correction.
   - Validated existing changelog reader, table, and view tests.
   - Applied Spotless formatting.
   
   ## Remaining validation
   
   This PR is intentionally in draft while evaluating additional
   projection combinations, delete-filter-required columns,
   performance implications, and applicability across Spark versions.
   
   Related work: #18317. This proposal focuses on the Spark 3.5
   reader-level projection defect.


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