[
https://issues.apache.org/jira/browse/CALCITE-2344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16496711#comment-16496711
]
Julian Hyde commented on CALCITE-2344:
--------------------------------------
If an aggregate function is applied over 0 rows - i.e. an empty window - then
the result is null. This applies to min, max, sum, but not count.
> Wrong constant reduction over windows function
> ----------------------------------------------
>
> Key: CALCITE-2344
> URL: https://issues.apache.org/jira/browse/CALCITE-2344
> Project: Calcite
> Issue Type: Bug
> Reporter: Laurent Goujon
> Assignee: Laurent Goujon
> Priority: Major
>
> {{RexUtil}} might incorrectly infer a IS NULL predicate would cause a
> reference over a window function to return null, but a window function type
> is never nullable.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)