On Wed, Jul 22, 2026 at 3:22 PM Chao Li <[email protected]> wrote: > Currently, JsonConstructorExpr does not store the JsonFormat information. To > fix this problem, we need to add a JsonFormat field to JsonConstructorExpr. > Please see the attached patch for details.
I considered recovering the format from func, as the arg that carries the format lives there. However, reaching it requires walking a complex CoalesceExpr tree to find the JsonValueExpr, which seems too fragile. So, recording the input FORMAT in JsonConstructorExpr for deparsing seems like the most feasible approach. Regarding the patch, I don't think we need to handle format in expression_tree_mutator/walker. I also don't think we need to copyObject the format. Other than that, the patch LGTM. I plan to push the attached patch soon barring any objections. - Richard
v2-0001-Fix-deparsing-of-JSON_ARRAY-subquery-with-a-FORMA.patch
Description: Binary data
