Paul Rogers has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/11883


Change subject: IMPALA-7808: Refactor Analyzer for easier debugging
......................................................................

IMPALA-7808: Refactor Analyzer for easier debugging

Changes two blocks of code to make debugging easier. No functional
changes occur; changes are pure refactoring. A trivial change in
AnalyzerContext removes a nested conditional clause.

A larger change in SelectStmt takes the large analysis function and
breaks it into a series of smaller functions. The functions were large
because they shared state: variables created near the top are used much
later near the bottom.

To solve this, moved the code into an "algorithm" class whose only job
is to hold onto the temporary state so that the big function can be
broken into smaller pieces, with the temporary class fields used in
place of the former local variables.

This CR introduces the inner algorithm class, but leaves the original
code at the original indent level to make reviews easier. You should see
the same code, now broken into smaller functions, with a new "driver"
section that calls these new functions from where the code itself
previously resided.

Once a review is done of the code in this form, I can revise this CR
with the only change being to indent the methods one level, which can be
reviewed as a second step.

One block of code had to be moved below the inner class since it is not
part of the analysis process.

Change-Id: I576c80c4c7a974df226fc91d8903db275069ed52
Testing: Reran all tests, which passed.
---
M fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java
M fe/src/main/java/org/apache/impala/analysis/SelectStmt.java
2 files changed, 227 insertions(+), 149 deletions(-)



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I576c80c4c7a974df226fc91d8903db275069ed52
Gerrit-Change-Number: 11883
Gerrit-PatchSet: 1
Gerrit-Owner: Paul Rogers <par0...@yahoo.com>

Reply via email to