[
https://issues.apache.org/jira/browse/IMPALA-13841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17934383#comment-17934383
]
ASF subversion and git services commented on IMPALA-13841:
----------------------------------------------------------
Commit 92f54d497f876abf097a5c62da3351bcc2c52f53 in impala's branch
refs/heads/master from Steve Carlin
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=92f54d497 ]
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
Reviewed-on: http://gerrit.cloudera.org:8080/22591
Reviewed-by: Michael Smith <[email protected]>
Tested-by: Michael Smith <[email protected]>
Reviewed-by: Joe McDonnell <[email protected]>
> Refactor AnalysisResult to make it immutable and simpler
> --------------------------------------------------------
>
> Key: IMPALA-13841
> URL: https://issues.apache.org/jira/browse/IMPALA-13841
> Project: IMPALA
> Issue Type: Improvement
> Reporter: Steve Carlin
> Priority: Major
>
> AnalysisContext has an AnalysisResult class which contains objects to be used
> by the Planner.
> AnalysisResult would be cleaner if:
> a) its members are "final", thus making it immutable
> b) AnalysisContext didn't reference anything off of AnalysisResult directly
> c) Making Analysis result POJO-ish, so that it only contains results of
> analysis and no methods like "createAnalyzer"
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]