stak...@cloudera.com has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/4534

Change subject: IMPALA-4142: qgen: Hive does not support CTEs inside sub-query 
blocks
......................................................................

IMPALA-4142: qgen: Hive does not support CTEs inside sub-query blocks

Changes:

Hive does not support WITH clauses inside sub-query blocks, the DefaultProfile 
actually
already has an option to disabled this called "use_nested_with" and the 
HiveProfile
returns False for this method. However, there is a bug in the usage of 
"use_nested_with";
it is not checked everytime a sub-query is created. Specifically, it is not 
checked when
an in-line view is created, or when the query within a WITH clause is created 
(so it's
possible to create WITH ... AS (WITH ...)). This patch fixes both of these 
issues since
Hive throws a SQL compile exception for either case.

Testing:

* Added new unit tests
* All unit tests pass
* Tested locally against Hive
* Tested against Impala via Leopard
* Tested against Impala via the discrepancy checker

Change-Id: Ie585bbbd88a32f502457a4ca9f2f54c7e1ade354
---
M tests/comparison/query_generator.py
A tests/comparison/tests/test_use_nested_with.py
2 files changed, 72 insertions(+), 2 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie585bbbd88a32f502457a4ca9f2f54c7e1ade354
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: stak...@cloudera.com

Reply via email to