impala-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From taras...@apache.org
Subject incubator-impala git commit: IMPALA-4585: Allow the $DATABASE template in the CATCH section
Date Thu, 08 Dec 2016 02:49:40 GMT
Repository: incubator-impala
Updated Branches:
  refs/heads/master 933751813 -> 1083639ff


IMPALA-4585: Allow the $DATABASE template in the CATCH section

In a recent change (IMPALA-4363) we introduced a change where all file
paths in .test files should be replaced with '__HDFS_FILENAME__'. This
caused problems for tests on non-HDFS file systems and we also lost some
test coverage. This patch fixes the problem by allowing the $DATABASE
template in the catch section of the .test file.

Change-Id: If0f6ae8dea7ac4cdaf0c61ebd8f0c589c353a96e
Reviewed-on: http://gerrit.cloudera.org:8080/5372
Reviewed-by: Dan Hecht <dhecht@cloudera.com>
Tested-by: Impala Public 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/1083639f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/1083639f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/1083639f

Branch: refs/heads/master
Commit: 1083639ff2a09ff157d3e8c6880973d954a20bb9
Parents: 9337518
Author: Taras Bobrovytsky <tbobrovytsky@cloudera.com>
Authored: Mon Dec 5 11:38:27 2016 -0800
Committer: Impala Public Jenkins <impala-public-jenkins@gerrit.cloudera.org>
Committed: Thu Dec 8 02:20:50 2016 +0000

----------------------------------------------------------------------
 .../functional-query/queries/QueryTest/grant_revoke.test       | 2 +-
 .../QueryTest/out-of-range-timestamp-abort-on-error.test       | 2 +-
 .../QueryTest/out-of-range-timestamp-continue-on-error.test    | 2 +-
 .../queries/QueryTest/parquet-resolution-by-name.test          | 3 ++-
 .../workloads/functional-query/queries/QueryTest/parquet.test  | 2 +-
 tests/common/impala_test_suite.py                              | 6 +++---
 6 files changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/1083639f/testdata/workloads/functional-query/queries/QueryTest/grant_revoke.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-query/queries/QueryTest/grant_revoke.test b/testdata/workloads/functional-query/queries/QueryTest/grant_revoke.test
index 3b12db4..fe340c2 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/grant_revoke.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/grant_revoke.test
@@ -204,7 +204,7 @@ STRING
 # on any URIs. The FE tests have additional error message verification.
 create table grant_rev_db.test_tbl2(i int) location '$FILESYSTEM_PREFIX/test-warehouse/grant_rev_test_tbl2';
 ---- CATCH
-does not have privileges to access: __HDFS_FILENAME__
+does not have privileges to access: $NAMENODE/test-warehouse/grant_rev_test_tbl2
 ====
 ---- QUERY
 grant role grant_revoke_test_ALL_URI to group $GROUP_NAME

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/1083639f/testdata/workloads/functional-query/queries/QueryTest/out-of-range-timestamp-abort-on-error.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-query/queries/QueryTest/out-of-range-timestamp-abort-on-error.test
b/testdata/workloads/functional-query/queries/QueryTest/out-of-range-timestamp-abort-on-error.test
index 087066a..c5783b1 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/out-of-range-timestamp-abort-on-error.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/out-of-range-timestamp-abort-on-error.test
@@ -4,5 +4,5 @@
 # the query is aborted with the right error message.
 SELECT * FROM out_of_range_timestamp;
 ---- CATCH
-Parquet file '__HDFS_FILENAME__' column 'ts' contains an out of range timestamp. The valid
date range is 1400-01-01..9999-12-31.
+Parquet file '$NAMENODE/test-warehouse/$DATABASE.db/out_of_range_timestamp/out_of_range_timestamp.parquet'
column 'ts' contains an out of range timestamp. The valid date range is 1400-01-01..9999-12-31.
 ====

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/1083639f/testdata/workloads/functional-query/queries/QueryTest/out-of-range-timestamp-continue-on-error.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-query/queries/QueryTest/out-of-range-timestamp-continue-on-error.test
b/testdata/workloads/functional-query/queries/QueryTest/out-of-range-timestamp-continue-on-error.test
index c571034..1fe185d 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/out-of-range-timestamp-continue-on-error.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/out-of-range-timestamp-continue-on-error.test
@@ -11,5 +11,5 @@ NULL
 9999-12-31 00:00:00
 NULL
 ---- ERRORS
-Parquet file '__HDFS_FILENAME__' column 'ts' contains an out of range timestamp. The valid
date range is 1400-01-01..9999-12-31. (1 of 2 similar)
+Parquet file '$NAMENODE/test-warehouse/$DATABASE.db/out_of_range_timestamp/out_of_range_timestamp.parquet'
column 'ts' contains an out of range timestamp. The valid date range is 1400-01-01..9999-12-31.
(1 of 2 similar)
 ====

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/1083639f/testdata/workloads/functional-query/queries/QueryTest/parquet-resolution-by-name.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-query/queries/QueryTest/parquet-resolution-by-name.test
b/testdata/workloads/functional-query/queries/QueryTest/parquet-resolution-by-name.test
index d4b8a43..2546e9c 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/parquet-resolution-by-name.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/parquet-resolution-by-name.test
@@ -220,7 +220,8 @@ string,int
 set parquet_fallback_schema_resolution="position";
 select key, value from switched_map_fields_resolution_test.int_map
 ---- CATCH
-File '__HDFS_FILENAME__' has an incompatible Parquet schema for column
+File '$NAMENODE/test-warehouse/$DATABASE.db/switched_map_fields_resolution_test/
+switched_map.parq' has an incompatible Parquet schema for column
  '$DATABASE.switched_map_fields_resolution_test.int_map.key'.
  Column type: STRING, Parquet schema:
 required int32 value [i:0 d:1 r:1]

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/1083639f/testdata/workloads/functional-query/queries/QueryTest/parquet.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-query/queries/QueryTest/parquet.test b/testdata/workloads/functional-query/queries/QueryTest/parquet.test
index 3946b94..a449162 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/parquet.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/parquet.test
@@ -50,7 +50,7 @@ bigint,bigint,string,string,boolean,boolean,bigint,bigint,bigint,bigint
 # Parquet file with invalid magic number
 SELECT * from bad_magic_number
 ---- CATCH
-File '__HDFS_FILENAME__' has an invalid version number: XXXX
+File '$NAMENODE/test-warehouse/bad_magic_number_parquet/bad_magic_number.parquet' has an
invalid version number: XXXX
 ====
 ---- QUERY
 # count(*) query on parquet file with multiple blocks (one block per node)

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/1083639f/tests/common/impala_test_suite.py
----------------------------------------------------------------------
diff --git a/tests/common/impala_test_suite.py b/tests/common/impala_test_suite.py
index 3a45d0c..c85b58b 100644
--- a/tests/common/impala_test_suite.py
+++ b/tests/common/impala_test_suite.py
@@ -202,7 +202,7 @@ class ImpalaTestSuite(BaseTestSuite):
     Verifies that at least one of the strings in 'expected_str' is a substring of the
     actual exception string 'actual_str'.
     """
-    actual_str = ''.join(apply_error_match_filter([actual_str.replace('\n', '')]))
+    actual_str = actual_str.replace('\n', '')
     for expected_str in expected_strs:
       # In error messages, some paths are always qualified and some are not.
       # So, allow both $NAMENODE and $FILESYSTEM_PREFIX to be used in CATCH.
@@ -231,8 +231,8 @@ class ImpalaTestSuite(BaseTestSuite):
         test_section[section_name] = test_section[section_name] \
                                      .replace('$NAMENODE', NAMENODE) \
                                      .replace('$IMPALA_HOME', IMPALA_HOME)
-      if use_db:
-        test_section['RESULTS'] = test_section['RESULTS'].replace('$DATABASE', use_db)
+        if use_db:
+          test_section[section_name] = test_section[section_name].replace('$DATABASE', use_db)
     verify_raw_results(test_section, result, vector.get_value('table_format').file_format,
                        pytest.config.option.update_results,
                        replace_filenames_with_placeholder)


Mime
View raw message