IMPALA-4434: In Python, ''.split('\n') is [''], which has length 1
This test simply may have never been run in GMT or UTC - it appears to
have an easy-to-make off-by-one error.
Change-Id: Iac4943085b0693deb380499cd0e141eb672bead8
Reviewed-on: http://gerrit.cloudera.org:8080/5061
Reviewed-by: Jim Apple <[email protected]>
Tested-by: Internal Jenkins
Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/b3cbc960
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/b3cbc960
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/b3cbc960
Branch: refs/heads/hadoop-next
Commit: b3cbc960a7e4beebf6cb9076a02b3513bb0b2954
Parents: 91b5264
Author: Jim Apple <[email protected]>
Authored: Sat Nov 12 18:56:40 2016 -0800
Committer: Internal Jenkins <[email protected]>
Committed: Tue Nov 15 15:29:26 2016 +0000
----------------------------------------------------------------------
tests/custom_cluster/test_hive_parquet_timestamp_conversion.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/b3cbc960/tests/custom_cluster/test_hive_parquet_timestamp_conversion.py
----------------------------------------------------------------------
diff --git a/tests/custom_cluster/test_hive_parquet_timestamp_conversion.py
b/tests/custom_cluster/test_hive_parquet_timestamp_conversion.py
index 6573500..731c766 100644
--- a/tests/custom_cluster/test_hive_parquet_timestamp_conversion.py
+++ b/tests/custom_cluster/test_hive_parquet_timestamp_conversion.py
@@ -93,8 +93,10 @@ class
TestHiveParquetTimestampConversion(CustomClusterTestSuite):
WHERE h.timestamp_col != FROM_UTC_TIMESTAMP(i.timestamp_col, '%s')
""" % tz_name)\
.get_data()
- expected_row_count = 0 if tz_name in ("UTC", "GMT") else 10000
- assert len(data.split('\n')) == expected_row_count
+ if tz_name in ("UTC", "GMT"):
+ assert len(data) == 0
+ else:
+ assert len(data.split('\n')) == 10000
# A value should either stay null or stay not null.
data = self.execute_query_expect_success(self.client, """
SELECT h.id, h.day, h.timestamp_col, i.timestamp_col