Skip to content

[python][ray] Fix zero-block overwrite#8632

Open
QuakeWang wants to merge 1 commit into
apache:masterfrom
QuakeWang:ray-empty-overwrite
Open

[python][ray] Fix zero-block overwrite#8632
QuakeWang wants to merge 1 commit into
apache:masterfrom
QuakeWang:ray-empty-overwrite

Conversation

@QuakeWang

Copy link
Copy Markdown
Member

Purpose

Ray 2.53+ defers Datasink.on_write_start() until the first input bundle. A zero-block dataset has no bundle, but on_write_complete() still runs, leaving Paimon's writer builder uninitialized. Whole-table and static-partition overwrites therefore fail before commit([]).

Initialize the writer builder on demand when completion needs to commit. Zero-block append writes remain no-ops.

Tests

  • Added unit coverage for a skipped on_write_start() callback.
  • Added an integration test using ray.data.range(0).
  • Passed RaySinkTest and RayIntegrationTest on Ray 2.54.0.
  • Verified the regression tests on Ray 2.52.1, 2.53.0, and 2.54.0.
  • Passed Python license and Flake8 checks.

Ray 2.53+ defers Datasink.on_write_start until the first input
bundle. A zero-block dataset still reaches
PaimonDatasink.on_write_complete without initializing the driver-side
writer builder. Whole-table and static-partition overwrites then fail
before commit([]).

Initialize the writer builder on demand only when completion needs to
commit. Cover the skipped callback and zero-block overwrite paths.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
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