Aman Sinha has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/15809


Change subject: IMPALA-9693: Use analyzed order-by expr during rewrite
......................................................................

IMPALA-9693: Use analyzed order-by expr during rewrite

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
saving the analyzed version of the order-by expr and
later supplies that to the rewriter. It does not change
the original OrderByElement's expr to avoid side effects.

Testing:
 - Added tests where predicate occurs in the ORDER BY
   either in the main query block or within analytic function.
 - Ran FE tests and ./run-tests.py query_test/test_queries.py

Change-Id: Icc487a1de629567027859036f244f949f171c4b5
---
M fe/src/main/java/org/apache/impala/analysis/OrderByElement.java
M fe/src/main/java/org/apache/impala/analysis/QueryStmt.java
M fe/src/main/java/org/apache/impala/analysis/SelectStmt.java
M testdata/workloads/functional-planner/queries/PlannerTest/convert-to-cnf.test
4 files changed, 73 insertions(+), 12 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/09/15809/1
-- 
To view, visit http://gerrit.cloudera.org:8080/15809
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc487a1de629567027859036f244f949f171c4b5
Gerrit-Change-Number: 15809
Gerrit-PatchSet: 1
Gerrit-Owner: Aman Sinha <[email protected]>

Reply via email to