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)

Reply via email to