Yukang-Lian opened a new pull request, #67252:
URL: https://github.com/apache/doris/pull/67252
### What problem does this PR solve?
Issue Number: None
Related PR: #62944
Problem Summary: Nereids predicate DELETE bypassed delete_without_partition
for non-Unique range and list tables after partition pruning moved into the
planner. A predicate that did not restrict the target partitions could
therefore delete across every partition while the safety switch was false, even
though unpartitioned tables must remain allowed. Use the physical scan
effective partition-pruning signal to reject only non-Unique partitioned
deletes that neither specify nor restrict partitions, while preserving Unique
and DELETE USING behavior.
### Release note
Nereids DELETE now honors delete_without_partition for non-Unique range and
list tables when no effective partition target is specified.
### Check List (For Author)
- Test: Unit Test and regression test case
- ./run-fe-ut.sh --run
org.apache.doris.nereids.trees.plans.commands.DeleteFromCommandTest
- ./run-fe-ut.sh --run
org.apache.doris.nereids.rules.rewrite.PartitionPrunerTest
- Added delete_p0/test_basic_delete_job coverage; not run locally
because this worktree has no FE/BE cluster output
- Behavior changed: Yes. Unsafe full-partition predicate deletes now require
delete_without_partition=true on non-Unique range/list tables; unpartitioned
and Unique table behavior is unchanged.
- Does this need documentation: No. The change restores the documented
safety-switch behavior.
Co-authored-by: Siyang Tang <[email protected]>
--
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]