You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2017/11/08 19:22:00 UTC
[jira] [Resolved] (CALCITE-1876) Push projections through Aggregate
to CsvTableScan
[ https://issues.apache.org/jira/browse/CALCITE-1876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Hyde resolved CALCITE-1876.
----------------------------------
Resolution: Fixed
Fix Version/s: 1.15.0
Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/77a35491; thanks for the PR, [~lfkauer]!
> Push projections through Aggregate to CsvTableScan
> --------------------------------------------------
>
> Key: CALCITE-1876
> URL: https://issues.apache.org/jira/browse/CALCITE-1876
> Project: Calcite
> Issue Type: Improvement
> Components: csv-adapter
> Reporter: Luis Fernando Kauer
> Assignee: Julian Hyde
> Priority: Minor
> Fix For: 1.15.0
>
>
> Create a rule to push the projections used in aggregate functions. From Julian Hyde:
> bq. Calcite should realize that Aggregate has an implied Project (because it only uses a few columns) and push that projection into the CsvTableScan, but it doesn’t.
> A query scans only the used projection when no aggregation is used:
> {code}
> explain plan for select name from emps;
> CsvTableScan(table=[[SALES, EMPS]], fields=[[1]])
> {code}
> But it scans all the projections when an aggregation is used:
> {code}
> explain plan for select max(name) from emps;
> EnumerableAggregate(group=[{}], EXPR$0=[MAX($1)])
> CsvTableScan(table=[[SALES, EMPS]], fields=[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]])
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)