Skip to content

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

Open
sezruby wants to merge 1 commit into
apache:mainfrom
sezruby:pr-page-index-write
Open

[VL] Support parquet.enable.page.index write option#12760
sezruby wants to merge 1 commit 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

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

2 participants