Csaba Ringhofer has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/19893 )

Change subject: IMPALA-12145: Fix profiles with non-ascii character in 
impala-shell (python2)
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/19893/1/shell/impala_shell.py
File shell/impala_shell.py:

http://gerrit.cloudera.org:8080/#/c/19893/1/shell/impala_shell.py@1144
PS1, Line 1144:           print(query_profile_prefix + profile)
> Tests in the test_shell_commandline.py file (specifically 'test_internation
Added conversion for the failed_profile case too. Adding test for this is a bit 
harder as this needs a query retry to happen.

>Should we convert all RPC results to unicode?
This is a bit tricky topic as there are conflicting goals:
- run in Python 2 and Python 3 too
- have good performance when printing query results
- handle strings that are not valid utf-8 sequences - this is possible as 
STRING can be used to store binary data in Impala (the BINARY type is 
relatively new) - so we replace unprintable characters (instead of throwing an 
exception and failing the query)

In the end the stream we print the results to expects utf-8 encoded byte array. 
The profile is a bit special case as we print it to stdout and not use the 
redirection set in -o parameter.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I99b72dd262fc7c382e8baee1dce7592880c84de2
Gerrit-Change-Number: 19893
Gerrit-PatchSet: 2
Gerrit-Owner: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Jason Fehr <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Comment-Date: Wed, 17 May 2023 11:45:53 +0000
Gerrit-HasComments: Yes

Reply via email to