Adam Tamas has uploaded this change for review. (
http://gerrit.cloudera.org:8080/16418
Change subject: IMPALA-10012: ds_hll_sketch() results ascii codec decoding
error fix
......................................................................
IMPALA-10012: ds_hll_sketch() results ascii codec decoding error fix
While the ds_hll_sketch() generates a string value as output the data
is not an ascii encoded text but a bitsketch, because of this, when
the shell get this data it disconnect while it tries to decode it.
The issue can be reproduced with a simple method like using unhex
with a wrong input.
Example: SELECT unhex("aa");
This patch contains a solution, where we replace any not UTF-8
decodable characters if we run into an UnicodeDecodeError after
fetching it.
This solution is working with the Thrift 0.9.3 autogenerated gen-py
but still fails with Thrift 0.11.0.
For Thrift 0.11.0 the error is catched and an error message is sent
(not working with beeswax protocol, because it generates a different
error (TypeError) which can come for other reasons too).
Testing:
-manual testing with these protocols: 'hs2-http', 'hs2', 'beeswax'
Change-Id: I0c5f1290356e21aed8ca7f896f953541942aed05
---
M shell/impala_client.py
M shell/impala_shell.py
M shell/shell_output.py
3 files changed, 37 insertions(+), 5 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/18/16418/1
--
To view, visit http://gerrit.cloudera.org:8080/16418
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c5f1290356e21aed8ca7f896f953541942aed05
Gerrit-Change-Number: 16418
Gerrit-PatchSet: 1
Gerrit-Owner: Adam Tamas <[email protected]>