Arnav-panjla opened a new pull request, #115:
URL: https://github.com/apache/fluss-rust/pull/115
### Purpose
<!-- Linking this pull request to the issue -->
Linked issue: close #99
<!-- What is the purpose of the change -->
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
<!-- Please describe the changes made in this pull request and explain how
they address the issue -->
- 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
<!-- List UT and IT cases to verify this change -->
- 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
<!-- Does this change affect API or storage 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
<!-- Does this change introduce a new feature -->
No.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]