You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spark.apache.org by Viacheslav Inozemtsev <vi...@gmail.com> on 2026/09/03 11:50:36 UTC

[SPARK-49933] Request to reopen PR #52185

Hello!

SPARK-49933 has been open since October 2024:

  https://issues.apache.org/jira/browse/SPARK-49933
  https://github.com/apache/spark/pull/52185

RewriteMergeIntoTable disables predicate pushdown whenever a `MERGE INTO`
has any `WHEN NOT MATCHED BY SOURCE` clause. That is only necessary when
such an action has no condition. Otherwise the rows the statement can touch
are bounded by the ON condition. The PR is an 8-line change doing exactly
that, falling back to today's behavior when a condition is absent.

It matters most for Iceberg, which has no replaceWhere equivalent, so the
`MERGE INTO` used in its place scans the whole target table (
https://github.com/apache/iceberg/issues/11248)

The PR was closed by the stale bot in January. The author confirms it is
code-complete and running in production as a plugin.

Would a committer familiar with DSv2 row-level operations be willing to
reopen and review it? I am happy to add test coverage.

Thanks,
Viacheslav Inozemtsev

Re: [SPARK-49933] Request to reopen PR #52185

Posted by Uroš Bojanić <ur...@apache.org>.
Hi,

Thank you for reaching out, I re-opened the PR to unblock the author. Please proceed to resolve conflicts accordingly, let the CI run again, and bring the changes to a reviewable / ready state, if the issue is still relevant of course.

Also, please find and ping relevant committers for PR review. For further technical discussion / review, it would likely be best to proceed in the PR itself. I'll also review it when I have some time. Please let me know if you need any additional help!

Best,
Uroš

On 2026/09/03 11:50:36 Viacheslav Inozemtsev wrote:
> Hello!
> 
> SPARK-49933 has been open since October 2024:
> 
>   https://issues.apache.org/jira/browse/SPARK-49933
>   https://github.com/apache/spark/pull/52185
> 
> RewriteMergeIntoTable disables predicate pushdown whenever a `MERGE INTO`
> has any `WHEN NOT MATCHED BY SOURCE` clause. That is only necessary when
> such an action has no condition. Otherwise the rows the statement can touch
> are bounded by the ON condition. The PR is an 8-line change doing exactly
> that, falling back to today's behavior when a condition is absent.
> 
> It matters most for Iceberg, which has no replaceWhere equivalent, so the
> `MERGE INTO` used in its place scans the whole target table (
> https://github.com/apache/iceberg/issues/11248)
> 
> The PR was closed by the stale bot in January. The author confirms it is
> code-complete and running in production as a plugin.
> 
> Would a committer familiar with DSv2 row-level operations be willing to
> reopen and review it? I am happy to add test coverage.
> 
> Thanks,
> Viacheslav Inozemtsev
> 

---------------------------------------------------------------------
To unsubscribe e-mail: dev-unsubscribe@spark.apache.org