Skip to content

fix(parquet): serialize column chunk file offsets - #1073

Open
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/parquet-column-chunk-file-offset
Open

fix(parquet): serialize column chunk file offsets#1073
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/parquet-column-chunk-file-offset

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #891

Problem

ColumnChunkMetaDataBuilder.Finish computed the first page offset for internal row-group metadata but did not copy it to the serialized Thrift ColumnChunk.FileOffset field. Serialized metadata therefore reported the default zero value even when the chunk started elsewhere.

Change

Populate ColumnChunk.FileOffset from the computed first page offset:

  • dictionary page offset when a dictionary page is present
  • data page offset otherwise

Coverage

The metadata round-trip test verifies dictionary and non-dictionary column chunks before and after serialization.

Validation

go test ./parquet/metadata

@fallintoplace
fallintoplace requested a review from zeroshade as a code owner July 30, 2026 19:50
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.

[Go][Parquet] ColumnChunkMetaDataBuilder.Finish() never writes file_offset onto the serialized thrift struct

1 participant