anuragmantri opened a new pull request, #56792: URL: https://github.com/apache/spark/pull/56792
### What changes were proposed in this pull request? This PR add the dynamic table options syntax to DELETE and UPDATE statements. ### Why are the changes needed? This is a follow up to [SPARK-49098](https://issues.apache.org/jira/browse/SPARK-49098) which itself was a follow up to [SPARK-36680](https://issues.apache.org/jira/browse/SPARK-36680) The DSv2 API already provides `RowLevelOperationInfo.options()` and `LogicalWriteInfo.options()` for this purpose, but they were always empty for DELETE and UPDATE because the rewrite rules hardcoded `CaseInsensitiveStringMap.empty()`. ### Does this PR introduce _any_ user-facing change? Yes, it adds new SQL syntax ```sql DELETE FROM catalog.db.table WITH (`k` = 'v') WHERE id > 10 UPDATE catalog.db.table WITH (`k` = 'v' ) SET status = 'archived' WHERE created_at < '2024-01-01'. ``` ### How was this patch tested? - Parser (DDLParserSuite) - End-to-end (DeleteFromTableSuiteBase, UpdateTableSuiteBase)DataSourceV2Relation - LogicalWriteInfo (InMemoryRowLevelOperationTable) ### Was this patch authored or co-authored using generative AI tooling? I used Claude Code (Claude Opus 4.8) to generate the code and tests and verified manually. -- 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]
