adiranjan25 commented on issue #19192:
URL: https://github.com/apache/iceberg/issues/19192#issuecomment-7269995692

   I'd like to investigate this issue and contribute a fix.
   
   Based on the reported behavior and my initial inspection of the Spark 
changelog implementation, there appears to be a mismatch between the projected 
schema and the field ordering of the rows produced by the changelog reader.
   
   The silent interchange of `_change_type` and `_file` is particularly 
concerning because downstream CDC consumers may receive incorrect metadata 
without an explicit execution failure.
   
   I am planning to investigate the following:
   
   - Reproduce the reported behavior against the latest upstream `main` using 
Spark 3.5.
   - Trace the projected schema through `SparkScanBuilder`, 
`SparkChangelogScan`, `SparkBatch`, and the changelog reader.
   - Verify field ordering and type consistency when selecting individual 
changelog columns and combinations of changelog and regular metadata columns.
   - Add regression coverage for both INSERT and DELETE changelog records.
   - Evaluate the related projection-ordering changes in #18317 to avoid 
duplicating existing work.
   - Validate the proposed correction against existing changelog tests and 
assess applicability across supported Spark versions.
   
   The objective is to ensure that changelog queries return correctly ordered, 
type-consistent metadata regardless of the selected column combination.
   
   I'll share my reproduction results and root-cause findings before proposing 
an implementation.
   
   Please let me know if anyone is already working on this specific issue or if 
there are additional considerations I should account for.


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