hubgeter commented on PR #69176:
URL: https://github.com/apache/doris/pull/69176#issuecomment-6262532448

   Addressed the review findings in a follow-up commit and rebased onto the 
latest master (`e0bf4874070`).
   
   **Reachability**
   - `RowLevelDmlCommand` now installs the same pre-rewrite `PlannerHook` the 
lineage extractor uses before planning a DELETE. A plain DELETE previously left 
`NereidsPlanner.analyzedPlan` null, so the fast path was unreachable. Added a 
unit test for the capture.
   
   **Exact predicate lowering**
   - Strict conversion commutes literal-left inequalities (`1 < id` becomes `id 
> 1`).
   - Every predicate slot must still carry its physical column name, so an 
alias/mask projection (`Alias.toSlot`) falls back instead of targeting another 
column.
   - SQL-unsafe negations (`NOT(col = x)`, `NOT IN`, `!=`) are rejected for the 
destructive path because iceberg's notEqual/notIn match NULL rows while SQL's 
`NOT(UNKNOWN)` does not; only `IS NOT NULL` is allowed. Guarded on both the 
engine and connector sides.
   - The converter is built with the history-aware 
`IcebergPredicateConverter.forTable`, so DATE→TIMESTAMP_NS promoted bounds 
force a fallback.
   - No conjunct is dropped because its name looks synthetic 
(`$partition_spec_id` is also a legal user column); it falls back instead.
   
   **Lifecycle / generation / accounting**
   - The bound write-metadata identity is carried into the SPI request and 
validated on the fresh load and again immediately before the commit.
   - The fresh load goes through `catalogOps.withTable`, so Glue / S3Tables / 
vended-REST FileIO is released on every exit.
   - The commit uses a transaction opened by `IcebergConnectorTransaction`, so 
manifest work on Iceberg's worker pool inherits the plugin Kerberos FileIO; the 
affected-row count reads *this delete's* committed snapshot from the 
transaction instead of a possibly refreshed `table.currentSnapshot()`.
   - The exact affected-row count is only derived when the candidates are 
hidden exclusively by deletion vectors (record count = cardinality); legacy 
position/equality deletes fall back to the row-level path.
   
   **SPI / tests**
   - `connector.plugin.api.version` bumped 18.0 → 19.0 for the new/updated 
`ConnectorWriteOps` method; metadata surface baseline refreshed.
   - The DV test fixture now carries its data file's partition and asserts a 
scan attaches it before the delete.
   
   Verification on the rebased head: fe-core targeted tests 62/62 (plan 
capture, strict conversion, exact extraction, transform wiring); 
`fe-connector-iceberg` 1615 tests, 0 failures/errors; `fe-connector-spi` 148 
tests, 0 failures (both surface baselines).


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to