dongjoon-hyun opened a new pull request, #60491: URL: https://github.com/apache/spark/pull/60491
### What changes were proposed in this pull request? This PR adds `RowLevelOperationBenchmark`, which measures the analysis of DSv2 row-level operations on wide tables. The analyzer rewrites `DELETE`, `UPDATE` and `MERGE` into `ReplaceData` for a group-based table and into `WriteDelta` for a delta-based table. The benchmark analyzes the following statements. - `UPDATE t SET c_1 = -1 WHERE pk = 1` on group-based and delta-based tables - `DELETE FROM t WHERE pk = 1` on a group-based table - `MERGE INTO t USING source s ON t.pk = s.pk WHEN MATCHED THEN UPDATE SET c_1 = s.v` on group-based and delta-based tables Each table is `pk INT NOT NULL, c_1 INT, ..., c_N INT, dep STRING` partitioned by `dep`, where `N` is 100, 1,000 or 10,000. The tables are created in `InMemoryRowLevelOperationTableCatalog`, and the delta-based ones have `'supports-deltas' = 'true'`. `source` is a one-row temporary view. Each iteration parses the statement and calls `spark.sessionState.executePlan(plan, CommandExecutionMode.SKIP).analyzed`, so the statement is not optimized, planned or executed. ### Why are the changes needed? To measure the analysis cost of DSv2 row-level operations on wide tables. Please note that this is a baseline to compare the future update. No existing benchmark covers these rewrites. `MergeRowsExecBenchmark` measures the execution of `MergeRows`, which it builds directly. ### Does this PR introduce _any_ user-facing change? No. This is a test-only change. ### How was this patch tested? Manually ran the benchmark. ``` build/sbt "sql/Test/runMain org.apache.spark.sql.execution.benchmark.RowLevelOperationBenchmark" ``` `RowLevelOperationBenchmark-results.txt` (JDK 21) and `RowLevelOperationBenchmark-jdk25-results.txt` (JDK 25) are generated with the `Run benchmarks` GitHub Actions workflow on `AMD EPYC 7763`. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Opus 5.5 -- 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]
