Skip to content

Conversation

@Arnav-panjla
Copy link

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.

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

2 participants