You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Anonymous Coward (Code Review)" <ge...@cloudera.org> on 2016/09/24 11:04:21 UTC

[Impala-ASF-CR] IMPALA-4142: qgen: Hive does not support CTEs inside sub-query blocks

stakiar@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: stakiar@cloudera.com

[Impala-ASF-CR] IMPALA-4142: qgen: Hive does not support CTEs inside sub-query blocks

Posted by "Anonymous Coward (Code Review)" <ge...@cloudera.org>.
stakiar@cloudera.com has uploaded a new patch set (#2).

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 disable 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 every time 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/2
-- 
To view, visit http://gerrit.cloudera.org:8080/4534
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie585bbbd88a32f502457a4ca9f2f54c7e1ade354
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: stakiar@cloudera.com
Gerrit-Reviewer: Michael Brown <mi...@cloudera.com>
Gerrit-Reviewer: Taras Bobrovytsky <tb...@cloudera.com>

[Impala-ASF-CR] IMPALA-4142: qgen: Hive does not support CTEs inside sub-query blocks

Posted by "Taras Bobrovytsky (Code Review)" <ge...@cloudera.org>.
Taras Bobrovytsky has posted comments on this change.

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


Patch Set 2: Code-Review+2 Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie585bbbd88a32f502457a4ca9f2f54c7e1ade354
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Michael Brown <mi...@cloudera.com>
Gerrit-Reviewer: Taras Bobrovytsky <tb...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-4142: qgen: Hive does not support CTEs inside sub-query blocks

Posted by "Taras Bobrovytsky (Code Review)" <ge...@cloudera.org>.
Taras Bobrovytsky has submitted this change and it was merged.

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 disable 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 every time 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
Reviewed-on: http://gerrit.cloudera.org:8080/4534
Reviewed-by: Taras Bobrovytsky <tb...@cloudera.com>
Tested-by: Taras Bobrovytsky <tb...@cloudera.com>
---
M tests/comparison/query_generator.py
A tests/comparison/tests/test_use_nested_with.py
2 files changed, 72 insertions(+), 2 deletions(-)

Approvals:
  Taras Bobrovytsky: Looks good to me, approved; Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie585bbbd88a32f502457a4ca9f2f54c7e1ade354
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Michael Brown <mi...@cloudera.com>
Gerrit-Reviewer: Taras Bobrovytsky <tb...@cloudera.com>

[Impala-ASF-CR] IMPALA-4142: qgen: Hive does not support CTEs inside sub-query blocks

Posted by "Taras Bobrovytsky (Code Review)" <ge...@cloudera.org>.
Taras Bobrovytsky has posted comments on this change.

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


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/4534/1//COMMIT_MSG
Commit Message:

PS1, Line 12: disabled
disable


PS1, Line 14: everytime
every time


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie585bbbd88a32f502457a4ca9f2f54c7e1ade354
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: stakiar@cloudera.com
Gerrit-Reviewer: Michael Brown <mi...@cloudera.com>
Gerrit-Reviewer: Taras Bobrovytsky <tb...@cloudera.com>
Gerrit-HasComments: Yes