[
https://issues.apache.org/jira/browse/CALCITE-4411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stamatis Zampetakis resolved CALCITE-4411.
------------------------------------------
Fix Version/s: 1.27.0
Resolution: Fixed
Fixed in
[https://github.com/apache/calcite/commit/42cd8ca8e511beee3c5b78e872ed4a79ee691f93|42cd8ca8e511beee3c5b78e872ed4a79ee691f93].
Thanks for the PR [~Aron.tao]!
> RelNode to SQL lost the distinct when doing window aggregation
> --------------------------------------------------------------
>
> Key: CALCITE-4411
> URL: https://issues.apache.org/jira/browse/CALCITE-4411
> Project: Calcite
> Issue Type: Bug
> Components: core
> Reporter: Jiatao Tao
> Assignee: Jiatao Tao
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.27.0
>
> Time Spent: 3h 10m
> Remaining Estimate: 0h
>
> The case see in: [https://github.com/Aaaaaaron/calcite/tree/CALCITE-4411]
> org.apache.calcite.rel.rel2sql.RelToSqlConverterTest#testConvertWindowToSql
>
> Query: SELECT count(distinct employee_id) over (order by hire_date) FROM
> employee
> Expected: SELECT COUNT(DISTINCT employee_id) OVER (ORDER BY hire_date RANGE
> BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) FROM foodmart.employee
> Actual: SELECT COUNT(employee_id) OVER (ORDER BY hire_date RANGE BETWEEN
> UNBOUNDED PRECEDING AND CURRENT ROW) FROM foodmart.employee
--
This message was sent by Atlassian Jira
(v8.3.4#803005)