Indian-boult opened a new pull request, #1024:
URL: https://github.com/apache/incubator-xtable/pull/1024

   Fixes #1022
   
   ## What is the purpose of the pull request
   
   The Delta Kernel source passed only top-level fields to the stats parser, so 
fields inside a struct lost their min, max and null counts. This PR passes all 
fields, as the Delta Standalone source has done since #769.
   
   This follows up my note on #1014. The Kernel source did not read nested 
stats at all, with or without column mapping, and this is the separate fix I 
mentioned there. The two PRs change different files and merge cleanly. A 
column-mapped table with a struct column needs both.
   
   ## Brief change log
   
   - `DeltaKernelDataFileExtractor`: use `schema.getAllFields()` for snapshot 
sync.
   - `DeltaKernelConversionSource#getTableChangeForCommit`: use 
`getReadSchema().getAllFields()` for incremental sync.
   - `ITDeltaKernelConversionSource#testNestedColumnStats`: a Delta table with 
a struct column and two commits. It checks the stats of `id`, `nested.name` and 
`nested.score`, with nulls, from `getCurrentSnapshot()` and from 
`getTableChangeForCommit()`. It uses only Delta and the internal model.
   
   ## Verify this pull request
   
   This change added tests and can be verified as follows:
   
   - Before the fix, `testNestedColumnStats` fails: the data file has stats 
only for `id`. With only the snapshot change, it fails in the incremental part.
   - After the fix, it passes.
   - `./mvnw -pl xtable-core test`: 581 tests, 0 failures, 0 errors, 3 skipped.
   - `./mvnw -pl xtable-core -DskipUTs 
-Dit.test='ITDeltaKernelConversionSource,ITConversionController#testVariousOperationsDeltaKernelSource+testColumnMappingEnabledDeltaToIceberg+testLateColumnMappingRenameDeltaToIceberg'
 verify`: 22 tests, 0 failures, 0 errors.
   - Manually synced the table from the issue to Iceberg with the Kernel 
source. Before the fix the Iceberg data file had bounds and null counts only 
for `id`. After the fix it also has them for `nested.name` and `nested.score`.
   


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