Skip to content

Commit 0ad3bfc

Browse files
authored
Merge branch 'main' into table_maintenance_pypaimon
2 parents f0c658a + ae53bbf commit 0ad3bfc

184 files changed

Lines changed: 49071 additions & 1901 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
run: cargo fmt --all -- --check
5959

6060
- name: Clippy
61-
run: cargo clippy --all-targets --workspace --features fulltext,vortex,mosaic -- -D warnings
61+
run: cargo clippy --all-targets --workspace --features fulltext,vortex -- -D warnings
6262

6363
build:
6464
runs-on: ${{ matrix.os }}
@@ -71,7 +71,7 @@ jobs:
7171
steps:
7272
- uses: actions/checkout@v7
7373
- name: Build
74-
run: cargo build --features fulltext,vortex,mosaic
74+
run: cargo build --features fulltext,vortex
7575

7676
unit:
7777
runs-on: ${{ matrix.os }}
@@ -85,7 +85,7 @@ jobs:
8585
- uses: actions/checkout@v7
8686

8787
- name: Test
88-
run: cargo test -p paimon --all-targets --features fulltext,vortex,mosaic
88+
run: cargo test -p paimon --all-targets --features fulltext,vortex
8989
env:
9090
RUST_LOG: DEBUG
9191
RUST_BACKTRACE: full

CONTRIBUTING.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,30 @@ This is a pure Rust project, so only `cargo` is needed. Here are some common com
4545
2. Open a pull request on the project's GitHub page. Provide a clear description of your changes and why they are necessary.
4646
3. Wait for reviews and address any feedback. Once the pull request is approved and merged, your changes will be part of the project.
4747

48+
## AI-Assisted Contributions
49+
50+
Apache Paimon Rust has the following policy for AI-assisted pull requests:
51+
52+
- The PR author should **understand the core ideas** behind the implementation **end-to-end** and be able to justify the design and code during review.
53+
- **Call out unknowns and assumptions.** It is acceptable not to fully understand some details of AI-generated code, but authors should identify these cases and point them out to reviewers. This allows reviewers to apply their knowledge of the codebase and evaluate potential concerns, such as correctness, concurrency, compatibility, or performance risks.
54+
55+
### Why fully AI-generated PRs without understanding are not helpful
56+
57+
AI tools cannot reliably make complex changes to Apache Paimon Rust on their own, which is why we rely on pull requests and code review.
58+
59+
The purposes of code review are:
60+
61+
1. Complete the intended task correctly.
62+
2. Share knowledge between authors and reviewers as a long-term investment in the project.
63+
64+
A fully AI-generated contribution without sufficient author understanding does not meet these purposes. Maintainers could use AI tools directly, while contributors acting only as a proxy gain little knowledge of the project.
65+
66+
Review capacity is limited, so large pull requests that appear to lack the required understanding may not be reviewed and may eventually be closed or redirected.
67+
68+
### Better ways to contribute than an "AI dump"
69+
70+
Consider writing a high-quality issue with a clear problem statement and a minimal reproducible example. This often makes it easier for the community to investigate the problem and develop an appropriate solution.
71+
4872
### Read the design docs
4973

5074
For a deeper understanding of the project, read the design documentation available on our [Paimon Rust](https://paimon.apache.org/docs/rust/).

bindings/c/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ license.workspace = true
2525
version.workspace = true
2626

2727
[lib]
28-
crate-type = ["cdylib", "staticlib"]
28+
crate-type = ["cdylib", "staticlib", "rlib"]
2929
doc = false
3030

3131
[dependencies]
3232
paimon = { path = "../../crates/paimon" }
3333
tokio = { workspace = true, features = ["rt-multi-thread"] }
3434
futures = "0.3"
35+
arrow = { workspace = true }
3536
arrow-array = { workspace = true }
37+
arrow-schema = { workspace = true }

bindings/c/DEPENDENCIES.rust.tsv

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindings/c/src/error.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ impl paimon_error {
5858
| paimon::Error::ColumnAlreadyExist { .. } => PaimonErrorCode::AlreadyExists,
5959
paimon::Error::ConfigInvalid { .. }
6060
| paimon::Error::DataTypeInvalid { .. }
61+
| paimon::Error::DataInvalid { .. }
6162
| paimon::Error::IdentifierInvalid { .. } => PaimonErrorCode::InvalidInput,
6263
paimon::Error::IoUnexpected { .. } => PaimonErrorCode::IoError,
6364
_ => PaimonErrorCode::Unexpected,

bindings/c/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ mod error;
2424
mod identifier;
2525
mod result;
2626
mod table;
27+
#[cfg(test)]
28+
mod tests;
2729
mod types;
30+
mod write;
2831

2932
use std::sync::OnceLock;
3033
use tokio::runtime::Runtime;

bindings/c/src/result.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,29 @@ pub struct paimon_result_next_batch {
7777
pub batch: paimon_arrow_batch,
7878
pub error: *mut paimon_error,
7979
}
80+
81+
// === Write/Commit result types ===
82+
83+
#[repr(C)]
84+
pub struct paimon_result_write_builder {
85+
pub write_builder: *mut paimon_write_builder,
86+
pub error: *mut paimon_error,
87+
}
88+
89+
#[repr(C)]
90+
pub struct paimon_result_table_write {
91+
pub write: *mut paimon_table_write,
92+
pub error: *mut paimon_error,
93+
}
94+
95+
#[repr(C)]
96+
pub struct paimon_result_table_commit {
97+
pub commit: *mut paimon_table_commit,
98+
pub error: *mut paimon_error,
99+
}
100+
101+
#[repr(C)]
102+
pub struct paimon_result_prepare_commit {
103+
pub messages: *mut paimon_commit_messages,
104+
pub error: *mut paimon_error,
105+
}

0 commit comments

Comments
 (0)