model-writtenrun 2893 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported that nested JSON_OBJECTAGG with random() crashed in ExecBuildAggTrans(), identifying an earlier JsonValueExpr refactoring as the regression source #1.
- Fabio R. Sluzala demonstrated that restoring the old executor handling fixed the reproducer #2, while Tender Wang independently diagnosed duplicate aggregate processing and proposed excluding raw_expr from expression-tree traversal #5 #6.
- Amit Langote extended the traversal approach to the expression-tree mutator and added deterministic volatile-function regression tests #7, then included Tender's parser-comment correction as a separate patch #9.
- Tender approved the series #10, and Amit pushed the comment correction separately while holding the crash fix to investigate changed EXPLAIN output #11.
- Tom Lane warned that leaving raw_expr unmaintained would break required transformations and deparsing #13 #15, then explained that missing executor initialization left a hole in aggregate transition state and recommended initializing both expressions #17.
- Concerned about evaluating duplicate aggregates, Amit proposed reverting the entire earlier refactoring and restoring CaseTestExpr indirection, with additional stable-function and constant-input tests #19.
- Tom rejected that revert for released branches because views already stored the newer query-tree representation, explaining why minor updates must preserve parse-analysis output compatibility #20 #22.
- Amit replaced the revert with a compatible executor fix that initializes raw_expr alongside formatted_expr #23, then clarified the commit message, node documentation, and regression-test explanation across #25, #26, and #27.
- Tom identified redundant constant-folding work and supplied an alternative that processes each expression once #28; Amit incorporated it using makeJsonValueExpr() in the final attachment #29.
- Tom approved the final attachment and suggested removing unnecessary assertions #30; Amit committed it as 11c87216d1 with two optimizer assertions removed and minor commit-message edits, then confirmed completion in the thread's last message #31.