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 2016/01/14 22:09:39 UTC

[jira] [Created] (CALCITE-1059) Not valid to convert Aggregate with on empty to empty if its GROUP BY key is empty

Julian Hyde created CALCITE-1059:
------------------------------------

             Summary: Not valid to convert Aggregate with on empty to empty if its GROUP BY key is empty
                 Key: CALCITE-1059
                 URL: https://issues.apache.org/jira/browse/CALCITE-1059
             Project: Calcite
          Issue Type: Bug
            Reporter: Julian Hyde
            Assignee: Julian Hyde


It it not valid to convert Aggregate with on empty to empty if its GROUP BY key is empty. Consider the following SQL:{code}SELECT count(*) FROM emp WHERE FALSE{code} Even though the input is empty, the output is one row.

Fix affects PruneEmptyRules.AGGREGATE_INSTANCE.

Also, add a RelBuilderFactory argument to all rules in PruneEmptyRules and call RelBuilder.empty rather than LogicalValues.createEmpty.



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