[
https://issues.apache.org/jira/browse/CALCITE-4220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julian Hyde updated CALCITE-4220:
---------------------------------
Description:
In {{SqlToRelConverter}} use {{RelBuilder}} for creating {{Aggregate}}.
Currently we call LogicalAggregate.create directly, and that misses some
optimizations.
Add config option {{RelBuilder.Config.aggregateUnique()}} to disable the
optimization that we don't create an {{Aggregate}} if the input is already
unique on the GROUP BY key. Without it, some tests in {{SqlToRelConverterTest}}
become trivial.
Also, that optimization is not valid if there are multiple group sets. (Because
we should output multiple rows, and Project only returns one.) So disable it in
that case.
Move the the code added by CALCITE-1824 from {{SqlToRelConverter}} to
{{RelBuilder}}. Now the {{GROUP_ID}} is handled correctly even if created via
{{RelBuilder}}.
was:
In {{SqlToRelConverter}} use {{RelBuilder}} for creating {{Aggregate}}.
Currently we call LogicalAggregate.create directly, and that misses some
optimizations.
Add config option {{RelBuilder.Config.aggregateUnique()}} to disable the
optimization that we don't create an {{Aggregate}} if the input is already
unique on the GROUP BY key. Without it, some tests in {{SqlToRelConverterTest}}
become trivial.
Also, that optimization is not valid if there are multiple group sets. (Because
we should output multiple rows, and Project only returns one.) So disable it in
that case.
> In SqlToRelConverter, use RelBuilder for creating Aggregate
> -----------------------------------------------------------
>
> Key: CALCITE-4220
> URL: https://issues.apache.org/jira/browse/CALCITE-4220
> Project: Calcite
> Issue Type: Bug
> Reporter: Julian Hyde
> Assignee: Julian Hyde
> Priority: Major
> Fix For: 1.26.0
>
>
> In {{SqlToRelConverter}} use {{RelBuilder}} for creating {{Aggregate}}.
> Currently we call LogicalAggregate.create directly, and that misses some
> optimizations.
> Add config option {{RelBuilder.Config.aggregateUnique()}} to disable the
> optimization that we don't create an {{Aggregate}} if the input is already
> unique on the GROUP BY key. Without it, some tests in
> {{SqlToRelConverterTest}} become trivial.
> Also, that optimization is not valid if there are multiple group sets.
> (Because we should output multiple rows, and Project only returns one.) So
> disable it in that case.
> Move the the code added by CALCITE-1824 from {{SqlToRelConverter}} to
> {{RelBuilder}}. Now the {{GROUP_ID}} is handled correctly even if created via
> {{RelBuilder}}.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)