Zoltan Borok-Nagy has submitted this change and it was merged. ( https://gerrit.cloudera.org/25233 )
Change subject: IMPALA-15695: Coerce BOOLEAN inputs to SUM ...................................................................... IMPALA-15695: Coerce BOOLEAN inputs to SUM Match the original planner by coercing BOOLEAN operands to BIGINT before SUM argument validation. Keep other functions and operand types on the existing coercion path. Add analysis coverage and shared query cases for NULL and empty input, DISTINCT and analytic SUM. Use AVG(BOOLEAN) to keep testing view alias error preservation now that SUM(BOOLEAN) is accepted. Testing: ViewAliasCorrectorTest (5 tests) and CalciteSumBooleanTest (14 tests) passed in an isolated fixture with cached FE support classes. The original SUM validation test reproduces the precommit failure. The AVG regression test catches ClassCastException with the old alias corrector. Change-Id: I4be510a6674d1c006e88ddaad4d4e3a7a40df4f6 Assisted-by: gpt-6.1-sol (Codex) Reviewed-on: https://gerrit.cloudera.org/25233 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Zoltan Borok-Nagy <[email protected]> --- M java/calcite-planner/src/main/java/org/apache/impala/calcite/type/ImpalaTypeCoercionImpl.java A java/calcite-planner/src/test/java/org/apache/impala/calcite/service/CalciteSumBooleanTest.java M java/calcite-planner/src/test/java/org/apache/impala/calcite/service/ViewAliasCorrectorTest.java M testdata/workloads/functional-query/queries/QueryTest/aggregation.test 4 files changed, 176 insertions(+), 3 deletions(-) Approvals: Impala Public Jenkins: Looks good to me, approved Zoltan Borok-Nagy: Verified -- To view, visit https://gerrit.cloudera.org/25233 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I4be510a6674d1c006e88ddaad4d4e3a7a40df4f6 Gerrit-Change-Number: 25233 Gerrit-PatchSet: 5 Gerrit-Owner: Aleksandr Efimov <[email protected]> Gerrit-Reviewer: Aleksandr Efimov <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Steve Carlin <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
