Repository navigation
Conversation
…lement name A Hudi table with a list of primitives failed its first publish with a NullPointerException while the column stats of a base file were read from its footer. Hudi's column stats reader names every list element <list>.list.element, whichever list layout the file uses. The extractor asked for the element as <list>.array and renamed it to list.element only when a nested field followed, so the key of a list of primitives matched none of the ranges that came back, and the range was converted with a null field. The key now uses list.element for every list element, whether the element is a leaf or a struct. A range whose column name maps to no field is skipped, so a name the extractor does not know costs the stats of that column and not the publish. A new test writes a struct that holds an int, a list of ints and a map with Parquet's two-level and three-level list layouts, and checks the row count, the stats of the columns next to the list and the stats of the list element.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important Read
Closes #1046, part of #722.
What is the purpose of the pull request
A Hudi table with a list of primitives no longer fails its first sync with a NullPointerException. Hudi's column stats reader names a list element
<list>.list.elementin either list layout, so the extractor now asks for that name, and skips a range whose column maps to no field.Brief change log
HudiFileStatsExtractoruseslist.elementfor every list element.TestHudiFileStatsExtractorchecks the stats of the list element in both list layouts, besides the columns next to the list.Known limitations:
<list>.arrayin metadata table column stats before; an old metadata table that stored that name loses those stats.Verify this pull request
This change added tests and can be verified as follows:
TestHudiFileStatsExtractorwrites a struct holding an int, a list of ints and a map in Parquet's two-level and three-level list layouts, and checks the row count, the stats of the columns next to the list and the stats of the list element.xtable-coreunit tests pass (3 skipped), thextable-coreIceberg ITs pass, and the Iceberg table format's 26 unit tests and 46 ITs pass (1 skipped).