Hello Aman Sinha, Fang-Yu Rao, Riza Suminto, Joe McDonnell, Michael Smith, 
Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

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

to look at the new patch set (#11).

Change subject: IMPALA-13841: Refactor AnalysisResult to make it immutable and 
simpler
......................................................................

IMPALA-13841: Refactor AnalysisResult to make it immutable and simpler

This refactoring is needed as a pre-step to adding analysis for the
Calcite Planner

The AnalysisResult class should be an class with immutable members with
the results obtained from analyzing the query. The Planner step which
follows should then be able to use the AnalysisResult to obtain the analysis
information. To keep it clean, AnalysisResult should not have any methods
like "createAnalyzer", something that produces a new object.

A new interface (and its implementor), AnalysisDriver has only one method
"analyze" which produces the AnalysisResult. The Calcite planner will
eventually implement this interface to produce its own AnalysisResult
(or a class derived from AnalysisResult) used by the framework.

Jira ticket IMPALA-13840 has been filed to deal with some code that was 
duplicated.
The code in many places can be made simpler if there were a StatementType enum
dealing with the types of StatementBase.

While the goal was to make AnalysisResult immutable, a bit more refactoring
has to be done to achieve this completely. The userHasProfileAccess_ member is
still mutable because it is changed in the AuthorizationChecker. This would
involve a more extensive change. Jira ticket IMPALA-13848 has been filed.

Change-Id: Idaf8854b1ce18c72a49893fc36e2cea77b7a2485
---
M fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java
A fe/src/main/java/org/apache/impala/analysis/AnalysisDriver.java
M fe/src/main/java/org/apache/impala/analysis/StmtRewriter.java
M fe/src/main/java/org/apache/impala/service/Frontend.java
M fe/src/test/java/org/apache/impala/analysis/ExprRewriteRulesTest.java
M fe/src/test/java/org/apache/impala/common/FrontendFixture.java
M fe/src/test/java/org/apache/impala/common/FrontendTestBase.java
M fe/src/test/java/org/apache/impala/common/QueryFixture.java
8 files changed, 303 insertions(+), 198 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/91/22591/11
--
To view, visit http://gerrit.cloudera.org:8080/22591
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idaf8854b1ce18c72a49893fc36e2cea77b7a2485
Gerrit-Change-Number: 22591
Gerrit-PatchSet: 11
Gerrit-Owner: Steve Carlin <scar...@cloudera.com>
Gerrit-Reviewer: Aman Sinha <amsi...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fangyu....@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <joemcdonn...@cloudera.com>
Gerrit-Reviewer: Michael Smith <michael.sm...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <riza.sumi...@cloudera.com>
Gerrit-Reviewer: Steve Carlin <scar...@cloudera.com>

Reply via email to