Skip to content

Conversation

@Arnav-panjla
Copy link
Contributor

Purpose

Linked issue: close #99

The current Rust client does not handle partitioned tables. To prevent incorrect usage,
this PR adds validation to return an UnsupportedOperation error when
new_append() or new_scan() is called on a partitioned table.

Brief change log

  • Added new UnsupportedOperation error variant in crates/fluss/src/error.rs to handle unsupported operations
  • Added partitioned table validation in FlussTable::new_append() - returns UnsupportedOperation error if the table is partitioned
  • Changed FlussTable::new_scan() return type from TableScan to Result<TableScan> and added partitioned table validation
  • Updated all call sites to handle the new Result return type:
    • crates/examples/src/example_table.rs
    • crates/fluss/tests/integration/table.rs
    • crates/fluss/tests/integration/table_remote_scan.rs
    • bindings/python/src/table.rs
    • bindings/cpp/src/lib.rs
  • Updated doc examples in crates/fluss/src/client/table/scanner.rs

Tests

  • All existing unit tests pass (cargo test --lib)
  • Integration tests updated to handle the new return type
  • Verified with cargo check, cargo clippy, and cargo fmt

API and Format

API Change: Yes

  • FlussTable::new_scan() return type changed from TableScan<'_> to Result<TableScan<'_>>
  • This is a breaking change for callers of new_scan(), but necessary to properly communicate the error condition

Storage Format: No

Documentation

No.

Copy link
Contributor

@luoyuxia luoyuxia left a comment

Choose a reason for hiding this comment

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

@Arnav-panjla Thanks for the pr. I think we can just return exception in method FlussConnection#get_table directly, which is more safe and simple

@Arnav-panjla
Copy link
Contributor Author

Thanks for the suggestion!
I’ll move the partitioned table validation to FlussConnection::get_table and simplify the downstream APIs accordingly.

@Arnav-panjla Arnav-panjla force-pushed the fix-partitioned-table-error branch from 945d4a1 to 0e3ed72 Compare January 5, 2026 13:05
Copy link
Contributor

@luoyuxia luoyuxia left a comment

Choose a reason for hiding this comment

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

@Arnav-panjla Thanks for update. LGTM!

@luoyuxia luoyuxia merged commit 845c9d7 into apache:main Jan 6, 2026
13 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.

return error for partitioned table

3 participants