Repository navigation
Commit 0e14fbd
committed
fix: recursively process all expressions in COALESCE arguments
The COALESCE expression handler was only processing SubLink (nested SELECT)
arguments, but not other expression types like TypeCast nodes. This caused
queries with '[]'::jsonb inside COALESCE to fail with "Type jsonb does not
exist" errors, since the ::jsonb->::json remapping never occurred.
Changed COALESCE handler to recursively process all argument types using
remappedExpressions(), matching the pattern used for function calls and
boolean expressions. This ensures type casts and other expressions are
properly remapped regardless of nesting context.
Added test coverage for COALESCE with jsonb type casts.1 parent a56c8ce commit 0e14fbd
2 files changed
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
261 | 271 | | |
262 | 272 | | |
263 | 273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
362 | 360 | | |
363 | 361 | | |
364 | 362 | | |
| |||
0 commit comments