Steve Carlin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/23135
Change subject: IMPALA-14126: Calcite planner: Fixed issues with character types ...................................................................... IMPALA-14126: Calcite planner: Fixed issues with character types There were a couple of issues with character types (char, varchar, string) that needed fixing: - count(varchar()) was not being cast correctly to string. The fix for this is in CoerceNodes.areSqlTypesEqual which now makes sure varchar is not the same sql type as string. - case did not have a proper signature for varchar. There is a weird quirk in function resolving for case where it always returns the "case(boolean)" signature. This seems like a more intrusive change to fix, so the Calcite planner now uses the same boolean signature and changes the return type in the Expr object, as done by the original planner. - varchar to char casts are now handled correctly Change-Id: I157d7bf4402031dd9874291963596f25f4729d7d --- 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/coercenodes/CoerceOperandShuttle.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/FunctionResolver.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/RexCallConverter.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/type/ImpalaTypeConverter.java M testdata/workloads/functional-query/queries/QueryTest/calcite.test 6 files changed, 163 insertions(+), 15 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/35/23135/1 -- To view, visit http://gerrit.cloudera.org:8080/23135 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I157d7bf4402031dd9874291963596f25f4729d7d Gerrit-Change-Number: 23135 Gerrit-PatchSet: 1 Gerrit-Owner: Steve Carlin <[email protected]>
