You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by st...@apache.org on 2020/11/10 04:56:22 UTC
[impala] 02/02: IMPALA-10145,
IMPALA-10299: Bump impala-shell thrift version to 0.11.0-p4
This is an automated email from the ASF dual-hosted git repository.
stigahuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
commit 9d6bf3509087dd94ac5bcc160145ba8940946dcb
Author: stiga-huang <hu...@gmail.com>
AuthorDate: Mon Nov 9 16:37:07 2020 +0800
IMPALA-10145,IMPALA-10299: Bump impala-shell thrift version to 0.11.0-p4
Currently, impala-shell depends on thrift-0.11.0-p2, while impala
servers depend on thrift-0.9.3-p8. After 0.10.0, thrift changes its
internal strings representation from bytes to unicode (THRIFT-3503) to
support Python3. THRIFT-2087 and THRIFT-5303 are two patches for
specifying an error handling method in decoding utf-8 strings in thrift.
Without them, impala-shell may get an unexpected UnicodeDecodeError when
decoding thrift objects from impala servers. This patch bumps
impala-shell's thrift version to 0.11.0-p4 to include these two patches.
Tests:
- This is a regression after we bump impala-shell's thrift version to
0.11. Added a test to avoid the regression in the future.
Change-Id: I0f9898639b5648658efc2d3c5c0ee4721fb85776
Reviewed-on: http://gerrit.cloudera.org:8080/16700
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
bin/impala-config.sh | 4 ++--
tests/shell/test_shell_commandline.py | 10 ++++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/bin/impala-config.sh b/bin/impala-config.sh
index 3232509..faee6d3 100755
--- a/bin/impala-config.sh
+++ b/bin/impala-config.sh
@@ -68,7 +68,7 @@ fi
# moving to a different build of the toolchain, e.g. when a version is bumped or a
# compile option is changed. The build id can be found in the output of the toolchain
# build jobs, it is constructed from the build number and toolchain git hash prefix.
-export IMPALA_TOOLCHAIN_BUILD_ID=59-78fc9e6092
+export IMPALA_TOOLCHAIN_BUILD_ID=61-7ce63be783
# Versions of toolchain dependencies.
# -----------------------------------
export IMPALA_AVRO_VERSION=1.7.4-p5
@@ -155,7 +155,7 @@ export IMPALA_TPC_H_VERSION=2.17.0
unset IMPALA_TPC_H_URL
export IMPALA_THRIFT_VERSION=0.9.3-p8
unset IMPALA_THRIFT_URL
-export IMPALA_THRIFT11_VERSION=0.11.0-p2
+export IMPALA_THRIFT11_VERSION=0.11.0-p4
unset IMPALA_THRIFT11_URL
export IMPALA_ZLIB_VERSION=1.2.8
unset IMPALA_ZLIB_URL
diff --git a/tests/shell/test_shell_commandline.py b/tests/shell/test_shell_commandline.py
index bf798c9..4448d4e 100644
--- a/tests/shell/test_shell_commandline.py
+++ b/tests/shell/test_shell_commandline.py
@@ -467,6 +467,16 @@ class TestImpalaShell(ImpalaTestSuite):
assert 'UnicodeDecodeError' not in result.stderr
assert RUSSIAN_CHARS.encode('utf-8') in result.stdout
+ def test_utf8_decoding_error_handling(self, vector):
+ """IMPALA-10145,IMPALA-10299: Regression tests for elegantly handling malformed utf-8
+ characters."""
+ result = run_impala_shell_cmd(vector, ['-B', '-q', "select substr('引擎', 1, 4)"])
+ assert 'UnicodeDecodeError' not in result.stderr
+ assert '引�' in result.stdout
+ result = run_impala_shell_cmd(vector, ['-B', '-q', "select unhex('aa')"])
+ assert 'UnicodeDecodeError' not in result.stderr
+ assert '�' in result.stdout
+
def test_global_config_file(self, vector):
"""Test global and user configuration files."""
args = []