model-writtenrun 3777 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Paul A Jungwirth proposed replacing the fixed UNNEST(column) estimate of ten rows with the average distinct-element count from DECHIST statistics, accepting that total element counts were unavailable and extending the improvement to other estimate_array_length() callers #1.
- Laurenz Albe flagged unstable numeric EXPLAIN output in the regression test, and Tom Lane recommended testing a change in plan shape because ANALYZE estimates can also vary #2 #3.
- jian he demonstrated improved estimates using array_op_test but exposed truncation of the fractional average, then supplied a patch on top of the original that changed the estimator and caller variables to double #4 #5.
- Paul's revised patch used array_op_test in a costs-disabled test that changed from a merge join to a nested loop and added clamp_row_est(), but deferred the double conversion as potentially separate work; he also left out an underestimation test requiring a new table of large arrays #6.
- Tom committed the revised patch as 9391f71523, incorporating Jian's double-return suggestion, allowing statistics for non-Var expressions, and guarding empty statistics slots; his closing announcement explained that the bespoke test was omitted over stability concerns because existing tests already exercised the new path, completing the feature #7.