dongjoon-hyun commented on PR #55518:
URL: https://github.com/apache/spark/pull/55518#issuecomment-5781515065

   Summarizing the blocking items from my [inline 
review](https://github.com/apache/spark/pull/55518#pullrequestreview-5281801632).
 All four are correctness issues specific to the narrow path; the same 
statements work on the wide path.
   
   1. **User-spelled attributes leak into the narrow scan output** 
([`RewriteUpdateTable.scala:454`](https://github.com/apache/spark/pull/55518#discussion_r4074793007)):
 under the default case-insensitive analysis, referencing an undeclared column 
with different casing (e.g. `SET salary = salary + BONUS`) puts a `BONUS`-named 
attribute into the scan, so the UPDATE fails at execution with 
`INTERNAL_ERROR_ATTRIBUTE_NOT_FOUND`.
   2. **Row-ID reassignment emits `pk` twice** 
([`RewriteUpdateTable.scala:316`](https://github.com/apache/spark/pull/55518#discussion_r4074793021)):
 `buildColumnUpdateProjection` outputs both the new `Alias(pk + 10, "pk")` and 
the original `pk`, so a `CHECK (pk > 0)` constraint or a write clustered on 
`pk` fails with `AMBIGUOUS_REFERENCE`.
   3. **Narrow relation breaks `PushDownUtils.pruneColumns` assumptions** 
([`RewriteRowLevelCommand.scala:101`](https://github.com/apache/spark/pull/55518#discussion_r4074793028)):
 a connector that partially prunes (allowed by 
`SupportsPushDownRequiredColumns`) hits `NoSuchElementException` in 
`toOutputAttrs`, and one without `SupportsPushDownRequiredColumns` silently 
binds full-width rows to the narrow output, writing misaligned values.
   4. **Metadata column accepted in `requiredDataAttributes()`** 
([`RewriteRowLevelCommand.scala:153`](https://github.com/apache/spark/pull/55518#discussion_r4074793040)):
 `LogicalPlan.resolve` falls back to metadata columns, so declaring 
`_partition` puts it among the data attrs; on the split path the `Expand` 
projections and output attrs then disagree slot by slot, silently swapping 
`dep` and `_partition` values.
   
   The remaining inline comments (the `writeUpdate` overload contract, the 
empty `schema()` documentation, and the test-infra items) are non-blocking.
   


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