Chloe Zhang created CALCITE-7579:
------------------------------------
Summary: 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
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)