Joe McDonnell created IMPALA-14157:
--------------------------------------
Summary: Python 3 displays binary types differently than Python 2
Key: IMPALA-14157
URL: https://issues.apache.org/jira/browse/IMPALA-14157
Project: IMPALA
Issue Type: Sub-task
Components: Infrastructure
Affects Versions: Impala 5.0.0
Reporter: Joe McDonnell
Running pytests with Python 3 results in test failures for binary types. e.g.
{noformat}
query_test/test_scanners.py:207: in test_partition_columns
self.run_test_case('QueryTest/iceberg-virtual-partition-columns', vector)
common/impala_test_suite.py:915: in run_test_case
self.__verify_results_and_errors(vector, test_section, result, use_db)
common/impala_test_suite.py:745: in __verify_results_and_errors
verify_raw_results(test_section, result, vector,
common/test_result_verifier.py:523: in verify_raw_results
VERIFIER_MAP[verifier](expected, actual)
common/test_result_verifier.py:305: in verify_query_result_is_equal
assert expected_results == actual_results
E assert Comparing QueryTestResults (expected vs actual):
E
0,'dHJ1ZQ==.MQ==.MTE=.MS4x.Mi4yMjI=.MTIzLjMyMQ==.MTkwNDU=.aW1wYWxh',1,true,1,11,1.100000023841858,2.222,123.321,2022-02-22,'impala'
!=
0,'b'dHJ1ZQ==.MQ==.MTE=.MS4x.Mi4yMjI=.MTIzLjMyMQ==.MTkwNDU=.aW1wYWxh'',1,true,1,11,1.100000023841858,2.222,123.321,2022-02-22,'impala'
E
0,'dHJ1ZQ==.MQ==.MTE=.MS4x.Mi4yMjI=.MTIzLjMyMQ==.MTkwNDU=.aW1wYWxh',2,true,1,11,1.100000023841858,2.222,123.321,2022-02-22,'impala'
!=
0,'b'dHJ1ZQ==.MQ==.MTE=.MS4x.Mi4yMjI=.MTIzLjMyMQ==.MTkwNDU=.aW1wYWxh'',2,true,1,11,1.100000023841858,2.222,123.321,2022-02-22,'impala'{noformat}
Python3 sees the columns as bytes and prints them with a b'...' format, which
doesn't match the expected result. We should decode it into a string (probably
with handling for invalid unicode) before the comparison.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]