-
由 Ashuka Xue 提交于
* Remove unused columns from subqueries This commit reduces the output columns for existential subqueries. For existential subqueries, we add a groupby operation on a key of the outer table, to simulate a semi-join. The grouping columns must be a key of the outer table, plus any columns that are required by the parent node. In an earlier commit, we pruned away unused columns in a query, but PcrsOutput() could still sometimes contain such unused columns. Our fix makes sure we only add used ColRefs to the grouping columns, to avoid problems when we generate and execute a query plan. Co-Authored-By: NHans Zeller <hzeller@pivotal.io>
c78b4e04