Commit 45a65d8
committed
fix(query): improve update handling about nondeterministic_update and add nullable columns
Added `replace_column_datatype_to_nullable` method to support updates involving nullable column types. Refactored `rewrite_nondeterministic_update` logic to use matcher-based pattern matching for enhanced clarity and maintainability. Updated tests to include scenarios with CTEs and nullable columns for improved test coverage.
Handle non-nullable expressions in update bindings
This update ensures non-nullable expressions are unified with nullable data types where required, maintaining consistency in type handling. Additionally, it includes error logging for cases when data type retrieval fails, improving debugging visibility.1 parent c332b8b commit 45a65d8
File tree
3 files changed
+68
-22
lines changed- src/query/sql/src/planner
- binder/bind_mutation
- plans
- tests/sqllogictests/suites/query/cte
3 files changed
+68
-22
lines changedLines changed: 23 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
121 | | - | |
| 123 | + | |
122 | 124 | | |
123 | 125 | | |
124 | | - | |
125 | | - | |
126 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
127 | 133 | | |
128 | | - | |
129 | | - | |
| 134 | + | |
130 | 135 | | |
131 | | - | |
| 136 | + | |
132 | 137 | | |
133 | 138 | | |
134 | 139 | | |
| |||
176 | 181 | | |
177 | 182 | | |
178 | 183 | | |
179 | | - | |
180 | 184 | | |
181 | 185 | | |
182 | 186 | | |
| |||
201 | 205 | | |
202 | 206 | | |
203 | 207 | | |
204 | | - | |
| 208 | + | |
205 | 209 | | |
206 | 210 | | |
207 | 211 | | |
| |||
213 | 217 | | |
214 | 218 | | |
215 | 219 | | |
216 | | - | |
| 220 | + | |
| 221 | + | |
217 | 222 | | |
218 | 223 | | |
219 | 224 | | |
| |||
242 | 247 | | |
243 | 248 | | |
244 | 249 | | |
245 | | - | |
| 250 | + | |
246 | 251 | | |
247 | 252 | | |
248 | 253 | | |
249 | 254 | | |
250 | 255 | | |
251 | 256 | | |
252 | | - | |
| 257 | + | |
253 | 258 | | |
254 | 259 | | |
255 | 260 | | |
| |||
270 | 275 | | |
271 | 276 | | |
272 | 277 | | |
273 | | - | |
| 278 | + | |
274 | 279 | | |
275 | | - | |
| 280 | + | |
276 | 281 | | |
277 | 282 | | |
278 | | - | |
| 283 | + | |
279 | 284 | | |
280 | 285 | | |
281 | 286 | | |
282 | 287 | | |
283 | 288 | | |
284 | 289 | | |
285 | 290 | | |
286 | | - | |
287 | | - | |
288 | | - | |
| 291 | + | |
| 292 | + | |
289 | 293 | | |
290 | 294 | | |
291 | | - | |
292 | | - | |
293 | | - | |
| 295 | + | |
294 | 296 | | |
295 | 297 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
296 | 323 | | |
297 | 324 | | |
298 | 325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | 82 | | |
84 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
0 commit comments