Skip to content

fix(parquet/encoding): honor BufferWriter offsets - #1144

Open
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/parquet-buffer-writer-offset
Open

fix(parquet/encoding): honor BufferWriter offsets#1144
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/parquet-buffer-writer-offset

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

Rationale for this change

BufferWriter mixed logical positions with physical buffer offsets. This made reservations too small, placed UnsafeWriteCopy at the wrong location, truncated buffers after UnsafeWrite, and applied the offset twice during Seek.

What changes are included in this PR?

Keep reservations, writes, length reporting, and seeking consistent with the configured offset. Add focused tests for regular writes, unsafe pattern writes, and seeking.

Are these changes tested?

  • go test ./parquet/internal/encoding
  • go test -race ./parquet/internal/encoding -run TestBufferWriter

Are there any user-facing changes?

Parquet buffer writers now preserve the expected logical position and length when an offset is used.

@fallintoplace
fallintoplace marked this pull request as ready for review August 8, 2026 15:52
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.

1 participant