brijrajk opened a new pull request, #57161:
URL: https://github.com/apache/spark/pull/57161

   ### What changes were proposed in this pull request?
   
   Extends the per-statement `WITH (key = value)` options clause to `DELETE` 
statements, consistent with the support already present for `SELECT` 
(SPARK-36680), `INSERT` (SPARK-49098), and `UPDATE` (SPARK-57681).
   
   Example syntax:
   ```sql
   DELETE FROM catalog.db.table WITH (`write.split-size` = 10) WHERE id < 100
   
   DELETE FROM catalog.db.table AS t WITH (`k` = 'v') WHERE t.id < 100
   ```
   
   The options are forwarded through the `DataSourceV2Relation`, 
`RowLevelOperationInfo`, and `LogicalWriteInfo` so that DataSource V2 
connectors receive them at every layer of the write path.
   
   ### Why are the changes needed?
   
   `DELETE` was the only DML statement missing this capability. Adding it 
completes the feature set across all row-level write operations and allows 
connectors to accept per-statement tuning options (e.g. split size, isolation 
level) on deletes without requiring separate configuration.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes — new SQL syntax. `DELETE FROM tbl WITH (k = v) WHERE ...` is now valid.
   
   ### How was this patch tested?
   
   - `DDLParserSuite`: two new parser tests covering `DELETE ... WITH (...)` 
without and with an alias.
   - `DeleteFromTableSuiteBase`: two new end-to-end tests verifying that 
options reach the `DataSourceV2Relation`, `RowLevelOperationInfo`, and 
`LogicalWriteInfo` layers.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Sonnet 4.6


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