Tim Armstrong 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)

http://gerrit.cloudera.org:8080/#/c/12022/2/shell/impala_client.py
File shell/impala_client.py:

http://gerrit.cloudera.org:8080/#/c/12022/2/shell/impala_client.py@520
PS2, Line 520:   def get_error_log(self, last_query_handle):
This isn't the right fix - both errors and warnings appear in this log. With 
your change on a successful query then we would report warnings as errors. E.g. 
an example query that succeeds but produces a warning:

  [localhost:21000] defawult> select abs(-9223372036854775808);
  Query: select abs(-9223372036854775808)
  Query submitted at: 2018-12-03 10:14:10 (Coordinator: 
http://tarmstrong-box:25000)
  Query progress can be monitored at: http://tarmstrong-box:25000/query_plan?
 query_id=8e461cb9602857cc:d7b811300000000
  +---------------------------+
  | abs(-9223372036854775808) |
  +---------------------------+
  | NULL                      |
  +---------------------------+
  WARNINGS: UDF WARNING: abs() overflowed, returning NULL

I think you're on the right track in that the issue is in how the shell is 
reporting errors rather than anything happening internally to Impala.

I added some prints to the code and I think the issue is in 
ImpalaClient.wait_to_finish() - it polls the status of the query and if it 
changes to EXCEPTION then it wraps up the warning log in an exception. Whereas 
for the other query the exception comes from iterating over the fetch() results.

The easiest way to get the same behaviour on both cases is probably actually to 
call fetch() when it notices the EXCEPTION state. That way you're guaranteed to 
get the same error.



--
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: Mon, 03 Dec 2018 18:29:44 +0000
Gerrit-HasComments: Yes

Reply via email to