Skip to content

[python] Support read.parallelism=auto for single-process reads#8637

Open
TheR1sing3un wants to merge 1 commit into
apache:masterfrom
TheR1sing3un:python-read-parallelism-auto
Open

[python] Support read.parallelism=auto for single-process reads#8637
TheR1sing3un wants to merge 1 commit into
apache:masterfrom
TheR1sing3un:python-read-parallelism-auto

Conversation

@TheR1sing3un

Copy link
Copy Markdown
Member

Purpose

read.parallelism defaulted to 1 (serial), the bottleneck for multi-split to_arrow/to_pandas/to_duckdb reads done directly through pypaimon.

This adds an opt-in "auto" value that resolves to min(number of splits, CPU count), accepted both as the read.parallelism option and as the runtime parallelism argument. The global default stays 1 so distributed engines (Ray/Daft), which already parallelize across splits at the outer layer, do not double-parallelize.

READ_PARALLELISM becomes a string option to carry "auto"; on-disk table options are already stored as strings, so existing int values keep working and cross-engine schemas are unaffected.

Tests

New unit tests for parallelism parsing (auto, integer strings, invalid values, case/whitespace) plus end-to-end auto-vs-serial parity tests via both the runtime argument and the table option in reader_parallel_test.py.

read.parallelism defaulted to 1 (serial), the bottleneck for multi-split
to_arrow/to_pandas/to_duckdb reads done directly through pypaimon. Add an
opt-in "auto" value that resolves to min(number of splits, CPU count),
accepted both as the read.parallelism option and as the runtime
parallelism argument. The global default stays 1 so distributed engines
(Ray/Daft), which already parallelize across splits at the outer layer,
do not double-parallelize.

READ_PARALLELISM becomes a string option to carry "auto"; on-disk table
options are already stored as strings, so existing int values keep
working and cross-engine schemas are unaffected.
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