Use "outer slot" to hold result of Agg's child node.
Long time ago, a hack was put in place in GPDB to use the "scan" slot, instead of the "outer" slot which is used in the upstream, to hold the result of an Agg or Window plan node's child. It's not clear to me why that was done. There was even a comment in fix_upper_expr() saying we wouldn't need it if we just fixed the executor to not contain that hack, and there was also a TODO comment in CMappingColIdVarPlStmt.cpp about that. Everything seems to work without those hacks, so revert this thing back to the way it works in the upstream. This is simpler in its own right, and also reduces our diff vs. upstream, which will make merging easier in the future.
Showing
想要评论请 注册 或 登录