JingsongLi commented on PR #11044:
URL: https://github.com/apache/paimon/pull/11044#issuecomment-6762085593
Thanks for adding `_ROW_ID` predicates to `update`. I reviewed `4efa564d`. I
think both APIs are useful. Predicate updates select rows, while
`update_columns_by_row_id` matches external Arrow values to individual IDs and
requires every ID to match.
- **[P2] Treat an inverted `_ROW_ID BETWEEN` as an empty range.** I
reproduced `table.update("_ROW_ID BETWEEN 2 AND 0 OR _ROW_ID = 1", {"label":
"new"})` on a table containing row ID 1. The Python path raises `ValueError`
when the planner constructs `Range(2, 0)`, while Native correctly updates row
1. Please return an empty range for inverted bounds and add a regression test
with the `OR` branch.
- **[P2] Document where `_ROW_ID` predicates are supported.** The Delete
section says `delete`, `scan().where(...)`, and `update(...)` share predicate
syntax. Currently `update` accepts `_ROW_ID`, but `delete` and
`scan().where(...)` reject it, even with `with_row_id()` on the scan. Please
clarify the scope and point readers to `take_row_ids` for ID lookups.
Two points remain for the batch API. Please consider an explicit `columns`
argument so an Arrow payload that carries older values in other columns cannot
overwrite them by accident. Please also document that a rollback followed by a
new append can reuse both row IDs and numeric snapshot IDs. Pending annotations
from the rolled-back history should be discarded before writeback.
The focused suites passed locally with 126 tests and 6 skips in pure Python,
and 132 tests with Native enabled. I reproduced the inverted-range behavior
separately.
--
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]