Aleksandr Efimov created IMPALA-15695:
-----------------------------------------
Summary: Calcite planner rejects SUM(BOOLEAN)
Key: IMPALA-15695
URL: https://issues.apache.org/jira/browse/IMPALA-15695
Project: IMPALA
Issue Type: Bug
Components: Frontend
Reporter: Aleksandr Efimov
Assignee: Aleksandr Efimov
The original planner accepts this query and returns BIGINT:
{code:sql}
SELECT SUM(TRUE) FROM (SELECT 1 AS x) t;
{code}
With PLANNER=CALCITE and FALLBACK_PLANNER=NONE, analysis fails:
{noformat}
Cannot apply 'SUM' to arguments of type 'SUM(<BOOLEAN>)'. Supported form(s):
'SUM(<NUMERIC>)'
{noformat}
FALSE, typed BOOLEAN NULL and BOOLEAN expressions are affected too. Calcite
should apply the same implicit BOOLEAN-to-BIGINT conversion as the original
planner.
Reproduced on master 234bd0001e33.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)