Impala Public Jenkins has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/15815 )

Change subject: IMPALA-9693: Analyze predicate in CNF rule if not previously 
done
......................................................................

IMPALA-9693: Analyze predicate in CNF rule if not previously done

The OrderByElement's expr that is used during the rewrite
phase was not analyzed, which causes an INVALID_TYPE
assert when the CNF rule tries to process the predicate
within the ORDER BY. This patch fixes the problem by
doing an explicit analyze of the compound predicate in
the CNF rule. This is a conservative approach such that
it can detect other such un-analyzed predicates that may
be passed in from any other clauses. An alternate attempt
at trying to replace the OrderByElement's expr with an
analyzed version works for this scenario but causes test
failures in ExprRewriterTest, so instead I have opted for
this approach.

Testing:
 - Added tests with compound predicate in the ORDER BY
   either in the main query block or within analytic function.
 - Ran 'mvn test' for FE.

Change-Id: Iff71871bd69a068f4b5807161cffa7a49d76226d
Reviewed-on: http://gerrit.cloudera.org:8080/15815
Reviewed-by: Quanlong Huang <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
M fe/src/main/java/org/apache/impala/rewrite/ConvertToCNFRule.java
M testdata/workloads/functional-planner/queries/PlannerTest/convert-to-cnf.test
2 files changed, 59 insertions(+), 11 deletions(-)

Approvals:
  Quanlong Huang: Looks good to me, approved
  Impala Public Jenkins: Verified

--
To view, visit http://gerrit.cloudera.org:8080/15815
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iff71871bd69a068f4b5807161cffa7a49d76226d
Gerrit-Change-Number: 15815
Gerrit-PatchSet: 2
Gerrit-Owner: Aman Sinha <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>

Reply via email to