felipepessoto opened a new pull request, #13666:
URL: https://github.com/apache/gluten/pull/13666

   ## What changes are proposed in this pull request?
   
   Relates to #12241.
   
   Reject Delta `IdMapping` in `DeltaScanTransformer` validation with an 
explicit fallback reason. The generic Parquet field-ID check runs before 
Delta's post-transform rule adds physical Parquet metadata, so it can otherwise 
miss these scans and read the wrong column by physical name.
   
   This restores Spark's field-ID read semantics without adding native field-ID 
support or changing writes. Ordinary and name-mapped Delta scans remain 
eligible for native execution. Native field-ID support remains follow-up work; 
the separate Spark 3.5 native-write issue is not addressed here.
   
   - Add a `gluten-ut` regression for missing and redirected field IDs with 
both row and vectorized Spark readers.
   - Keep fixture writes on Spark so the read regression is independent of the 
Spark 3.5 native writer's missing field IDs.
   - Preserve existing expected rows and partition-pruning checks while 
updating shared Delta scan expectations; retain native name-mapping controls.
   - Update the Delta support documentation.
   
   ## How was this patch tested?
   
   - Scoped `dev/format-scala-code.sh` apply/check, the repository 
license-header checker on all changed files, and `git diff --check`: passed.
   - Compiled the actual changed `DeltaScanTransformer.scala` with Scala 
2.13.17 against Spark 4.1.1, Delta 4.4.1, and the native bundle from [CI run 
43781825980](https://github.com/apache/gluten/actions/runs/43781825980).
   - Ran a standalone `spark-submit` regression under WSL using that bundle, 
first unchanged and then with the compiled production class overlaid:
   
   | Read case | Original bundle | Patched class |
   | --- | --- | --- |
   | Missing ID 100, row and vectorized readers | Incorrect physical-name value 
| NULL, Spark scan |
   | ID redirected to the other stored field, row and vectorized readers | 
Incorrect original-field value | Other field's value, Spark scan |
   | Ordinary Delta scan | Correct, native | Correct, native |
   | Name-mapped Delta scan | Correct, native | Correct, native |
   
   This is focused native runtime validation, not a fresh full Maven/native 
build. The newly added Spark 3.5 ScalaTest suite and the modified shared 
backend suites have not been run through Maven locally. The exact upstream 
`DeltaColumnMappingSuite#explicit id matching` test has not been rerun, so its 
known-failure entry is intentionally unchanged pending CI confirmation; remove 
it once that test is reported passing.
   
   ## Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: GitHub Copilot 1.0.106-8.unstable.r43566476370.g869eef3 (GPT-6 
Astra)


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