[ 
https://issues.apache.org/jira/browse/CALCITE-4411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jiatao Tao updated CALCITE-4411:
--------------------------------
    Description: 
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

> Rel to SQL lost distinct when doing window
> ------------------------------------------
>
>                 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
>
> 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)

Reply via email to