[ 
https://issues.apache.org/jira/browse/CALCITE-7579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18086006#comment-18086006
 ] 

Chloe Zhang commented on CALCITE-7579:
--------------------------------------

https://github.com/apache/calcite/pull/4990

> REGR_COUNT arguments are dropped in RelNode
> -------------------------------------------
>
>                 Key: CALCITE-7579
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7579
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Chloe Zhang
>            Assignee: Chloe Zhang
>            Priority: Major
>
> When parses {{REGR_COUNT(y, x)}} the SqlKind is mistakenly set to 
> {{SqlKind.COUNT}} instead of {{{}SqlKind.REGR_COUNT{}}}, the agg builder then 
> drop the args {{y}} and {{x}} and replace with {{{}*{}}}, leading to empty 
> arg list of the agg call at RelNode stage.
> A way to repro it is, parse and plan it, then convert it back to SQL, it 
> would be:
> REGR_COUNT(y, x) -> REGR_COUNT(*)
> which is semantically incorrect



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to