Skip to content

[1037] Read Hudi column stats for all columns in one metadata table lookup - #1032

Merged
the-other-tim-brown merged 3 commits into
apache:mainfrom
the-other-tim-brown:perf/hudi-colstats-batch
Nov 25, 2026
Merged

the-other-tim-brown merged 3 commits into
apache:mainfrom
the-other-tim-brown:perf/hudi-colstats-batch

Conversation

@the-other-tim-brown

Copy link
Copy Markdown
Contributor

What is the purpose of the pull request

HudiFileStatsExtractor.computeColumnStatsFromMetadataTable called HoodieTableMetadata.getColumnStats(files, column) once for each column. Every one of those calls scans the metadata table's column stats file slices again. A wall-clock profile with async-profiler put this at about 35% of ITHudiConversionSource's test-thread time.

Hudi provides getColumnStats(files, List<String> columns), and the single-column overload already delegates to it with a one-element list. So making one call for all columns returns the same stats with a single scan.

Brief change log

  • Make one getColumnStats(files, columns) call, and map each returned stat back to its field by columnName.
  • Update the TestHudiFileStatsExtractor mocks to the list overload.

Local timing, with 4 JUnit threads: ITHudiConversionSource goes from 131.6s to 93.5s.

Verify this pull request

This pull request is already covered by existing tests: TestHudiFileStatsExtractor, which includes a case against a real metadata table, ITHudiConversionSource and ITConversionController.

🤖 Generated with Claude Code

…lookup

HudiFileStatsExtractor looked up column stats once per column, and each
lookup scans the column stats partition's file slices again. Use the
multi-column getColumnStats overload, which the single-column one already
delegates to.
@the-other-tim-brown the-other-tim-brown changed the title [MINOR] Read Hudi column stats for all columns in one metadata table lookup [1037] Read Hudi column stats for all columns in one metadata table lookup Nov 24, 2026
@the-other-tim-brown
the-other-tim-brown merged commit 1d5da68 into apache:main Nov 25, 2026
7 of 8 checks passed
@the-other-tim-brown
the-other-tim-brown deleted the perf/hudi-colstats-batch branch November 25, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants