Skip to content

[python] Pass Mosaic options to writer#8400

Merged
JingsongLi merged 1 commit into
apache:masterfrom
QuakeWang:py-mosaic-options
Jul 1, 2026
Merged

[python] Pass Mosaic options to writer#8400
JingsongLi merged 1 commit into
apache:masterfrom
QuakeWang:py-mosaic-options

Conversation

@QuakeWang

Copy link
Copy Markdown
Member

Purpose

Python Mosaic writes built data files with mosaic.write_table(data, stream) and did not pass table options into Mosaic WriterOptions. As a result, Python tables using file.format=mosaic ignored configured mosaic.num-buckets, mosaic.stats-columns, file.block-size, and file.compression.zstd-level.

This PR maps the relevant table options into Mosaic writer options and passes them through Python data writers and FileIO implementations.

Tests

  • python -m pytest pypaimon/tests/mosaic_writer_options_test.py -q
  • python -m pytest pypaimon/tests/test_format_mosaic_reader_writer.py pypaimon/tests/mosaic_writer_options_test.py -q

Python Mosaic writes called mosaic.write_table without propagating table options, so configured bucket count, stats columns, block size, and zstd level were ignored on Python write paths.

Build Mosaic WriterOptions from CoreOptions and pass them through Python data writers and FileIO implementations.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
@JingsongLi

Copy link
Copy Markdown
Contributor

+1

@JingsongLi JingsongLi merged commit 4041b51 into apache:master Jul 1, 2026
6 checks passed
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