Skip to content

[VL] Support parquet.enable.page.index write option - #12760

Merged
zhouyuan merged 2 commits into
apache:mainfrom
sezruby:pr-page-index-write
Aug 18, 2026
Merged

[VL] Support parquet.enable.page.index write option#12760
zhouyuan merged 2 commits into
apache:mainfrom
sezruby:pr-page-index-write

Conversation

@sezruby

@sezruby sezruby commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

Add a parquet.enable.page.index write option that maps to Velox's
ParquetWriterOptions::enableWritePageIndex (facebookincubator/velox#18325).
When enabled, the native Parquet writer emits the column index and offset index
(page index); when disabled, they are omitted.

The option defaults to true, matching Spark/parquet-mr, which write the page
index by default (SPARK-26345); Velox's writer leaves it opt-in. Set
parquet.enable.page.index=false to turn it off.

  • GlutenConfig (Scala and C++): define the parquet.enable.page.index key.
  • VeloxParquetWriterInjects: forward the option into the native write config.
  • VeloxWriterUtils::makeParquetWriteOption: set enableWritePageIndex,
    defaulting to on when the option is unset.
  • Document the option in the Parquet write configuration table.

How was this patch tested?

Added a VeloxParquetWriteSuite test that writes with parquet.enable.page.index
set to true, set to false, and left unset, and asserts (via parquet-mr footer
inspection) that the Parquet ColumnIndex/OffsetIndex references are present
when the option is on or defaulted and absent when it is off, and that the written
data round-trips.

The enabled and disabled write paths were validated end-to-end in a Docker build
against a Velox snapshot that includes the enableWritePageIndex field; the
default (unset) path sets the same enableWritePageIndex=true as the
explicit-enable path.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 4.8)

@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@sezruby
sezruby force-pushed the pr-page-index-write branch from 3355a00 to a5a5fcf Compare August 12, 2026 18:25
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@zhouyuan

Copy link
Copy Markdown
Member

@sezruby would you please do a rebase? The parquet index patch is already landed

@sezruby
sezruby force-pushed the pr-page-index-write branch from a5a5fcf to 95a1ca3 Compare August 14, 2026 15:58
@github-actions github-actions Bot added CORE works for Gluten Core VELOX DOCS labels Aug 14, 2026
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@sezruby
sezruby force-pushed the pr-page-index-write branch from 95a1ca3 to ce5a0b5 Compare August 14, 2026 16:12
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@sezruby
sezruby marked this pull request as ready for review August 14, 2026 16:14

@zhouyuan zhouyuan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@infvg infvg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a few minor nits. Also please run ./dev/gen-all-config-docs.sh if you haven't already

Add a parquet.enable.page.index write option that maps to the Velox
ParquetWriterOptions::enableWritePageIndex field (facebookincubator/velox#18325):

- GlutenConfig (Scala/C++): define the parquet.enable.page.index key.
- VeloxParquetWriterInjects: forward the option to native write config.
- VeloxWriterUtils::makeParquetWriteOption: set enableWritePageIndex,
  defaulting to on when the option is unset.

When enabled, the writer emits the Parquet column index and offset index
(page index); when disabled, they are omitted. The option defaults to true
to match Spark/parquet-mr, which write the page index by default
(SPARK-26345); Velox's writer leaves it opt-in. Set
parquet.enable.page.index=false to turn it off.

Documented in the parquet write configuration table and covered by a
VeloxParquetWriteSuite test that asserts the ColumnIndex/OffsetIndex presence
tracks the option (enabled, disabled, and unset/default) and that data
round-trips.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sezruby
sezruby force-pushed the pr-page-index-write branch from ce5a0b5 to f998f93 Compare August 17, 2026 15:15
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@sezruby

sezruby commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

@infvg I've addressed your review comments on the test: removed the extra comments and split the column-index / offset-index checks into two separate asserts, so a regression that breaks only one of them is still caught. PTAL when you get a chance.

For context on the earlier red CI here: those failures were transient GitHub rate-limiting (HTTP 429) while fetching build dependencies during the CMake configure step, not a code issue. I opened #12804 to add a short retry/backoff around that step so this class of transient download failure no longer fails the build.

@zhouyuan
zhouyuan merged commit 7374ac2 into apache:main Aug 18, 2026
73 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE works for Gluten Core DOCS VELOX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants