Steve Carlin has uploaded this change for review. ( https://gerrit.cloudera.org/25389
Change subject: IMPALA-14910 (addendum): Fixed broken limit tests for Calcite ...................................................................... IMPALA-14910 (addendum): Fixed broken limit tests for Calcite Two issues needed fixing on top of the Calcite planner patch which allow the limit clause to contain expressions: - A check needs to be made when changedList is null. This came up in the code review and was determined as not needed. However, only the coercion of the RexCall is done at this point of the code. The reduction of the expression occurs later. If no coercion is needed on the parameters, changedList will be null, and this needs to be handled. - Logic to enforce the return type has been added to the limit expression in the validation logic. The setNodeValidatedType is called for other expressions within SqlValidatorImpl. Calcite does not support expressions in the limit clause so this needed to be added explicitly. This code is hit if there is a convertlet used within the expression. One specific example where this is needed is the expression "limit 10 % 1" Testing: Found these errors when the "fallback_planner=none" query option was set. These tests now succeed. Change-Id: If49af06661ccfedb3055f37a96ba1b14e501ee0c --- M java/calcite-planner/src/main/java/org/apache/impala/calcite/coercenodes/CoerceNodes.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ImpalaSqlValidatorImpl.java 2 files changed, 19 insertions(+), 5 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/89/25389/1 -- To view, visit https://gerrit.cloudera.org/25389 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If49af06661ccfedb3055f37a96ba1b14e501ee0c Gerrit-Change-Number: 25389 Gerrit-PatchSet: 1 Gerrit-Owner: Steve Carlin <[email protected]>
