hutiefang76 opened a new pull request, #19796:
URL: https://github.com/apache/hudi/pull/19796

   ## What is the change?
   
   - Return the existing empty internal-schema sentinel when a legacy relation 
has no required columns.
   - Keep non-empty projection pruning unchanged.
   - Restore the schema-on-read legacy `count()` regression assertion and add a 
focused unit regression test.
   
   ## Why
   
   Fixes #19734. Pruning an internal schema with an empty column list currently 
constructs an invalid schema around a null record, causing an NPE in 
`InternalSchema.buildIdToName`.
   
   ## Verification
   
   - `mvn test -Punit-tests -Pjava17 -Dscala-2.13 -Dspark4.2 -pl 
hudi-spark-datasource/hudi-spark -am -Dtest=TestHoodieRelations 
-Dsurefire.failIfNoSpecifiedTests=false -DskipITs -Dcheckstyle.skip=true 
-Drat.skip=true`
     - `TestHoodieRelations`: 2 tests passed, including the new 
empty-projection regression.
   - The restored Spark schema-on-read test was started locally, but the forked 
JVM stopped making progress on macOS/Apple Silicon with JDK 21 and did not 
respond to a thread dump. It remains in the change set for CI coverage.


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

Reply via email to