Abhishek Rawat has uploaded a new patch set (#3). ( 
http://gerrit.cloudera.org:8080/13753 )

Change subject: IMPALA-8673: Add query option to force plan hints for insert 
queries
......................................................................

IMPALA-8673: Add query option to force plan hints for insert queries

IMPALA-5293 enabled the pre-insert clustering by default. This could
cause performance regression and this change provides a query option
for setting default hints for INSERT statement.

New query option 'DEFAULT_HINTS_INSERT_STATEMENT' was added. It also
supports adding multiple supported hints when separated by ':'
  set DEFAULT_HINTS_INSERT_STATEMENT=[clustered|noclustered];
  set DEFAULT_HINTS_INSERT_STATEMENT=[shuffle|noshuffle];
  set DEFAULT_HINTS_INSERT_STATEMENT=
          [clustered|noclustered]:[shuffle|noshuffle];

If a given insert statement already has plan hints in the query text,
the default hints, if any, are all ignored. This is because, if a query
has plan hints specified by the user, we don't want to override it.
When a default hint is set, and there is an INSERT statement without any
plan hints in the query text, the default hints have the same affect as
they would have had, if they were applied as plan hints in the query
text. So these default hints have the same application and restrictions
as the existing plan hints for INSERT statement. The default hints apply
to HDFS and Kudu table formats and are ignored for HBase table format.

Testing:
- Added unit tests in AnalyzeDDLTest for CTAS.
- Added unit tests in AnalyzeStmtsTest for insert statements.
- Added unit tests in PlannerTest validating the plan for various
  scenarios involving different combinations of default hints.

Change-Id: I1c3f213402b8e4d1940f96738ad21edf800fa43a
---
M be/src/service/query-options.cc
M be/src/service/query-options.h
M common/thrift/ImpalaInternalService.thrift
M common/thrift/ImpalaService.thrift
M fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java
M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeStmtsTest.java
M fe/src/test/java/org/apache/impala/planner/PlannerTest.java
A 
testdata/workloads/functional-planner/queries/PlannerTest/insert-default-clustered-noshuffle.test
A 
testdata/workloads/functional-planner/queries/PlannerTest/insert-default-clustered-shuffle.test
A 
testdata/workloads/functional-planner/queries/PlannerTest/insert-default-clustered.test
A 
testdata/workloads/functional-planner/queries/PlannerTest/insert-default-noclustered-noshuffle.test
A 
testdata/workloads/functional-planner/queries/PlannerTest/insert-default-noclustered-shuffle.test
A 
testdata/workloads/functional-planner/queries/PlannerTest/insert-default-noclustered.test
A 
testdata/workloads/functional-planner/queries/PlannerTest/insert-default-noshuffle.test
A 
testdata/workloads/functional-planner/queries/PlannerTest/insert-default-shuffle.test
17 files changed, 1,359 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/53/13753/3
--
To view, visit http://gerrit.cloudera.org:8080/13753
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I1c3f213402b8e4d1940f96738ad21edf800fa43a
Gerrit-Change-Number: 13753
Gerrit-PatchSet: 3
Gerrit-Owner: Abhishek Rawat <ara...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ara...@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bhara...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Lars Volker <l...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>

Reply via email to