[
https://issues.apache.org/jira/browse/CALCITE-1740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15969858#comment-15969858
]
Julian Hyde commented on CALCITE-1740:
--------------------------------------
Some review comments:
* Rename {{isDistinct}} to {{distinct}} and make it final;
* Make one RexOver constructor call the other, and deprecate the one without
the distinct argument;
* In {{convertOver}} could you use a shuttle (or visitor)? In fact, could you
add code to {{HistogramShuttle.visitCall}}, which is what creates the
{{RexOver}} anyway;
* I think your test should be in {{SqlToRelConverterTest}}. Check the result
using textual comparison, like the other tests in that class.
> Distinct aggregate flag in window function
> ------------------------------------------
>
> Key: CALCITE-1740
> URL: https://issues.apache.org/jira/browse/CALCITE-1740
> Project: Calcite
> Issue Type: Bug
> Components: core
> Reporter: radu
> Assignee: Julian Hyde
> Labels: build, windows
>
> When parsing queries such as
> SELECT B1, SUM(DISTINCT B2) OVER (ORDER BY B4 RANGE BETWEEN INTERVAL '10'
> SECOND PRECEDING AND CURRENT ROW) FROM T
> The aggregates in the LogicalWindow do not have any marker of being distinct.
> isDistinct() flag is not set. Probably some rule(s) silently swallow the
> DISTINCT keyword
> The LogicalWindow object that result is
> LogicalWindow(window#0=[window(partition {} order by [2] range between $3
> PRECEDING and CURRENT ROW aggs [COUNT($1), $SUM0($1)])])
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)