Skip to content

[auto-merge] branch-25.10 to branch-25.12 [skip ci] [bot]#13534

Merged
nvauto merged 1 commit into
branch-25.12from
branch-25.10
Sep 29, 2025
Merged

[auto-merge] branch-25.10 to branch-25.12 [skip ci] [bot]#13534
nvauto merged 1 commit into
branch-25.12from
branch-25.10

Conversation

@nvauto

@nvauto nvauto commented Sep 29, 2025

Copy link
Copy Markdown
Collaborator

auto-merge triggered by github actions on branch-25.10 to create a PR keeping branch-25.12 up-to-date. If this PR is unable to be merged due to conflicts, it will remain open until manually fix.

Fixes #13531 

### Description

In OSS Delta 3.x, IncrementMetric is used to count the number of rows
passing through it. It is used for metrics like `numTargetRowsInserted`.

In 2.4- it is implemented using a UDF for which we provide a GPU version
https://github.com/NVIDIA/spark-rapids/blob/7a894deb90f53308aa75b0065a4813ff95b7753a/delta-lake/delta-24x/src/main/scala/org/apache/spark/sql/delta/rapids/delta24x/GpuMergeIntoCommand.scala#L1133-L1141.
The reason for a change on the CPU side is to make it codegen-able.
spark-rapids just needs an equivalent implementation for it to avoid a
CPU fallback with a ColumnarToRow penalty.

#### Benchmarks

cloned `store_sales` from the SF10 TPC-DS dataset 

Merge the original table into the shallow-cloned table updating a
varying number of rows: 5%, 10%, 20%, 40%, 100%

```SQL
MERGE INTO delta.`/path/store_sales.cloned` AS target
USING delta.`/path/store_sales` AS source
  ON target.ss_ticket_number = source.ss_ticket_number 
    AND target.ss_item_sk = source.ss_item_sk 
    AND (source.ss_ticket_number * source.ss_item_sk) % 1000 < 400
WHEN MATCHED THEN
  UPDATE SET target.ss_coupon_amt = source.ss_coupon_amt;
```

Match % | 25.10 pre-PR | 25.10 post-PR | Speedup
-- | -- | -- | --
100% | 41 | 25 | 1.64
40% | 39 | 26 | 1.5
20% | 39 | 26 | 1.5
10% | 40 | 26 | 1.538461538
5% | 41 | 26 | 1.576923077

### Checklists

- [ ] This PR has added documentation for new or modified features or
behaviors.
- [ ] This PR has added new tests or modified existing tests to cover
new code paths.
(Please explain in the PR description how the new code paths are tested,
such as names of the new/existing tests that cover them.)
- [x] Performance testing has been performed and its results are added
in the PR description. Or, an issue has been filed with a link in the PR
description.

---------

Signed-off-by: Gera Shegalov <gshegalov@nvidia.com>
@nvauto nvauto merged commit 08c59f7 into branch-25.12 Sep 29, 2025
@nvauto

nvauto commented Sep 29, 2025

Copy link
Copy Markdown
Collaborator Author

SUCCESS - auto-merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants