You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Vineet Garg (JIRA)" <ji...@apache.org> on 2016/11/11 18:23:59 UTC

[jira] [Commented] (CALCITE-1489) Add rule, AggegateValuesRule, that applies to Aggregate on empty relation

    [ https://issues.apache.org/jira/browse/CALCITE-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15657723#comment-15657723 ] 

Vineet Garg commented on CALCITE-1489:
--------------------------------------

Hi Julian,

Could you elaborate a little more on what this rule will do and why is this required ?

> Add rule, AggegateValuesRule, that applies to Aggregate on empty relation
> -------------------------------------------------------------------------
>
>                 Key: CALCITE-1489
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1489
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>
> Let's call it {{AggregateValuesRule}}, consistent with the naming convention where we start with the type of rel(s) being acted on. Initially it would apply to an empty {{Values}}, but potentially it could apply to one or more values.
> I don't recall aggregates having a way to tell us what they will return on empty (or constant) input. In future we could use the constant reducer for that, but for now, the rule should match a particular set of aggregates: {{COUNT}} and {{SUM0}} return zero; {{MIN}}, {{MAX}}, {{SUM}} return null. It must abort if it sees an aggregate it does not know how to handle.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)