Skip to content

feat(core): add bulk insert for append-only tables#588

Open
morningstarxcdcode wants to merge 2 commits into
apache:mainfrom
morningstarxcdcode:fix/565-bulk-insert-append-only
Open

feat(core): add bulk insert for append-only tables#588
morningstarxcdcode wants to merge 2 commits into
apache:mainfrom
morningstarxcdcode:fix/565-bulk-insert-append-only

Conversation

@morningstarxcdcode

@morningstarxcdcode morningstarxcdcode commented May 1, 2026

Copy link
Copy Markdown

Description

adds bulk insert support for append-only tables in hudi-core. so the writer creates a Parquet base file, and writes the matching commit metadata, and rejects partitioned tables for now. The result now exposes the actual commit-relative path, so callers can find the commit file in both timeline layouts .sweet

fixes #565.

How are the changes test-covered

  • N/A
  • Automated tests (unit and/or integration tests)
  • Manual tests
    • Details are described below

Validated with:

  • cargo test -p hudi-core --test table_bulk_insert_tests -- --nocapture
image

The test suite covers the happy path, layout v2 commit placement, and partitioned-table rejection.

@morningstarxcdcode morningstarxcdcode marked this pull request as ready for review May 1, 2026 15:04
Copilot AI review requested due to automatic review settings May 1, 2026 15:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds bulk insert support for unpartitioned, append-only tables in hudi-core by introducing a dedicated writer that writes a Parquet base file and corresponding commit metadata, with tests covering the happy path and partitioned-table rejection.

Changes:

  • Introduce BulkInsertWriter + BulkInsertResult to write Parquet base files and commit metadata for bulk inserts.
  • Expose Table::bulk_insert(...) as the public entrypoint delegating to the writer.
  • Add integration tests validating successful bulk insert and partitioned-table rejection.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.

File Description
crates/core/tests/table_bulk_insert_tests.rs Adds integration tests for bulk insert success + rejection when table is partitioned.
crates/core/src/table/writer.rs Implements a minimal bulk insert writer: writes Parquet, writes commit metadata (JSON vs Avro for layout v2).
crates/core/src/table/mod.rs Exposes the new writer module and adds Table::bulk_insert.

Comment thread crates/core/src/table/writer.rs
Comment thread crates/core/src/table/writer.rs
Comment thread crates/core/src/table/writer.rs Outdated
Comment thread crates/core/tests/table_bulk_insert_tests.rs Outdated
Comment thread crates/core/tests/table_bulk_insert_tests.rs Outdated
Comment thread crates/core/tests/table_bulk_insert_tests.rs
Comment thread crates/core/src/table/writer.rs
Comment thread crates/core/src/table/writer.rs
@morningstarxcdcode morningstarxcdcode marked this pull request as draft May 1, 2026 15:18
@morningstarxcdcode morningstarxcdcode marked this pull request as ready for review May 2, 2026 14:39
@morningstarxcdcode

Copy link
Copy Markdown
Author

@xushiyan could you please review it..

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.

Add bulk insert write support for append-only tables

2 participants