Aman Sinha has uploaded this change for review. ( 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 --- 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(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/15/15815/1 -- 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: newchange Gerrit-Change-Id: Iff71871bd69a068f4b5807161cffa7a49d76226d Gerrit-Change-Number: 15815 Gerrit-PatchSet: 1 Gerrit-Owner: Aman Sinha <[email protected]>
