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 2015/04/28 01:51:39 UTC
[jira] [Created] (CALCITE-703) Obsolete AggregateCall.name
Julian Hyde created CALCITE-703:
-----------------------------------
Summary: Obsolete AggregateCall.name
Key: CALCITE-703
URL: https://issues.apache.org/jira/browse/CALCITE-703
Project: Calcite
Issue Type: Bug
Reporter: Julian Hyde
Assignee: Julian Hyde
AggregateCall has a name field, and it is currently used to populate the name of the output field. But it makes as much sense for an aggregate call, say {{COUNT(x)}}, to have a name as for a call to a regular operator, say {{x + y}}.
Obsolete the name field, and provide another means to specify the output field names of an Aggregate.
Here is a proposal:
* Add {{RelDataType rowType}} argument to the constructor of Aggregate (and sub-types such as LogicalAggregate)
* Add {{Map<Integer, String> fieldNames}} argument to {{Aggregate#create}}; if there is not an entry for a particular output field ordinal, uses the current rule (input field for grouping fields, "i$" + grouping field for indicators, "f$" + n for aggregate calls).
* Remove the {{String name}} argument from AggregateCall constructor.
* Existing methods will remain, deprecated, to be removed just before 2.0.
Thus if you currently create an AggregateCall with a name, you would instead pass that name in via the fieldNames map. Aggregate would assign a row-type during construction.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)