Commit 2c54cde
authored
feat: support limited deletion (#20137)
## Rationale for this change
We support `DELETE LIMIT` query and it would be good to port our fork
patch to the upstream.
<!--
Why are you proposing this change? If this is already explained clearly
in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand
your changes and offer better suggestions for fixes.
-->
## What changes are included in this PR?
This patch adds a support for delete statement with limit planning. An
inner table scan is wrapped with a limit in this case. e.g.:
```
query TT
explain delete from t1 limit 10
----
logical_plan
01)Dml: op=[Delete] table=[t1]
02)--Limit: skip=0, fetch=10
03)----TableScan: t1
physical_plan
01)CooperativeExec
02)--DmlResultExec: rows_affected=0
```
## Are these changes tested?
Covered with SLT.
## Are there any user-facing changes?
Now queries with limited deletion are successfully planned, instead of
returning not-supported error.1 parent aeeb0ba commit 2c54cde
2 files changed
Lines changed: 39 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1108 | 1108 | | |
1109 | 1109 | | |
1110 | 1110 | | |
1111 | | - | |
1112 | | - | |
1113 | | - | |
1114 | | - | |
1115 | 1111 | | |
1116 | | - | |
| 1112 | + | |
1117 | 1113 | | |
1118 | 1114 | | |
1119 | 1115 | | |
| |||
1322 | 1318 | | |
1323 | 1319 | | |
1324 | 1320 | | |
1325 | | - | |
| 1321 | + | |
1326 | 1322 | | |
1327 | 1323 | | |
1328 | 1324 | | |
| |||
2072 | 2068 | | |
2073 | 2069 | | |
2074 | 2070 | | |
| 2071 | + | |
2075 | 2072 | | |
2076 | 2073 | | |
2077 | 2074 | | |
| |||
2085 | 2082 | | |
2086 | 2083 | | |
2087 | 2084 | | |
2088 | | - | |
| 2085 | + | |
2089 | 2086 | | |
2090 | 2087 | | |
2091 | 2088 | | |
| |||
2102 | 2099 | | |
2103 | 2100 | | |
2104 | 2101 | | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
2105 | 2110 | | |
2106 | 2111 | | |
2107 | 2112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
0 commit comments