Yongjun Zhang has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/12022 )

Change subject: IMPALA-5474: Adding a trivial subquery turns error into warning
......................................................................


Patch Set 2:

> (1 comment)

Thanks Tim, good points. The experiment you did is exactly what I did to find 
out where the WARN/ERROR messages are from.

Internally we only have the following states:

beeswax::QueryState::type ClientRequestState::BeeswaxQueryState() const {     
  switch (operation_state_) {                                 
    case TOperationState::INITIALIZED_STATE: return 
beeswax::QueryState::CREATED;
    case TOperationState::PENDING_STATE: return beeswax::QueryState::COMPILED;
    case TOperationState::RUNNING_STATE: return beeswax::QueryState::RUNNING;   
         
    case TOperationState::FINISHED_STATE: return beeswax::QueryState::FINISHED;
    case TOperationState::ERROR_STATE: return beeswax::QueryState::EXCEPTION;
    default: {                           
      DCHECK(false) << "Add explicit translation for all used TOperationState 
values";
      return beeswax::QueryState::EXCEPTION;                                    
    
    }                                                               
  }                                                 
}

We can see here that ERROR is treated the same as EXCEPTION in the above code. 
If some EXCEPTION is not the same as ERROR, then we want to have a distinct 
state to distinguish. For example, we may have EXCEPTION_ERROR, and 
EXCEPTION_WARN states.

Due to lack of two distinct states, we get into the situation that either way 
the wait_to_finish function can be wrong: if we issue a WARN there, it may be 
an ERROR; if we issue an ERROR, it may be just a WARN.

Your suggestion to call fetch() when in EXCEPTION state sounds good, but is it 
always valid to try fetch() when in EXCEPTION state? There is some logic/code 
between wait_to_finish and fetch() in impala_shell.py. We may need to apply the 
same logic inside wait_to_finish when detecting EXCEPTION state.

Thanks.
 > (1 comment)


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibedb11dd3d50bcdb21d508f7d21691925491946e
Gerrit-Change-Number: 12022
Gerrit-PatchSet: 2
Gerrit-Owner: Yongjun Zhang <yjzhan...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Paul Rogers <par0...@yahoo.com>
Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>
Gerrit-Reviewer: Yongjun Zhang <yjzhan...@apache.org>
Gerrit-Comment-Date: Tue, 04 Dec 2018 06:41:40 +0000
Gerrit-HasComments: No

Reply via email to