Reinstate strictness of int4_avg_combine
The "combine" function for the int4 sum/avg aggregate functions is backported to Greenplum 6.0 in commit 313cef6e (from postgres/postgres@11c8669c0cc) but we made the inevitable omission of setting the "strictness" of int4_avg_combine to false. This by itself is harmless as the actual function body *does* guard against NULL input, but it also prohibits a whole host of optimizations when the executor and planner can detect NULL input early on and short-circuit the execution. Oops. This patch flips the `proisstrict` flag back to true for int4_avg_combine. Backpatch to 6X_STABLE. (cherry picked from commit c334bedc)
Showing
想要评论请 注册 或 登录