Alex Behm has posted comments on this change. Change subject: IMPALA-3856,IMPALA-3871: Fix BinaryPredicate normalization for Kudu ......................................................................
Patch Set 2: (7 comments) http://gerrit.cloudera.org:8080/#/c/3986/2/fe/src/main/java/com/cloudera/impala/analysis/BinaryPredicate.java File fe/src/main/java/com/cloudera/impala/analysis/BinaryPredicate.java: Line 117: * Normalizes a 'predicate' consisting of one SlotRef and an expr that is constant into ... consisting of an uncast SlotRef and a constant Expr... we usually use <SlotRef> <op> <LiteralExpr> Line 123: throws AnalysisException { does not throw anymore, right? Line 144: LOG.debug("BinaryPredicate '" + predicate.toSql() + "' cannot be normalized: " not sure we need this logging Line 149: if (!(predicate.getChild(0) instanceof SlotRef) || remove first condition since it's a precondition of reaching this part http://gerrit.cloudera.org:8080/#/c/3986/2/fe/src/main/java/com/cloudera/impala/analysis/Expr.java File fe/src/main/java/com/cloudera/impala/analysis/Expr.java: Line 1201 Leave TODO. It's still not a generic constant folding function. http://gerrit.cloudera.org:8080/#/c/3986/2/fe/src/main/java/com/cloudera/impala/analysis/LiteralExpr.java File fe/src/main/java/com/cloudera/impala/analysis/LiteralExpr.java: Line 54: public static boolean isSupportedType(Type type) { This seems more complicated than changing LiteralExpr.create() to return null because now we have to keep this new function in sync with LiteralExpr.create() (of which there are several variants). http://gerrit.cloudera.org:8080/#/c/3986/2/testdata/workloads/functional-query/queries/QueryTest/kudu-expr.test File testdata/workloads/functional-query/queries/QueryTest/kudu-expr.test: Line 3: # IMPALA-3856: KuduScanNode crash when pushing predicates including a cast I think these should really be planner tests. We should assert that these predicates are not part of the 'kudu predicates'. -- To view, visit http://gerrit.cloudera.org:8080/3986 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae7612433a2e27f8887abe6624f9ee0f4867b934 Gerrit-PatchSet: 2 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Matthew Jacobs <[email protected]> Gerrit-Reviewer: Alex Behm <[email protected]> Gerrit-HasComments: Yes
