Repository: impala
Updated Branches:
  refs/heads/master 4bd7cc8db -> ff86feaa6


http://git-wip-us.apache.org/repos/asf/impala/blob/f0b3d9d1/testdata/workloads/functional-query/queries/QueryTest/partition-col-types.test
----------------------------------------------------------------------
diff --git 
a/testdata/workloads/functional-query/queries/QueryTest/partition-col-types.test
 
b/testdata/workloads/functional-query/queries/QueryTest/partition-col-types.test
index e364ce4..cd98972 100644
--- 
a/testdata/workloads/functional-query/queries/QueryTest/partition-col-types.test
+++ 
b/testdata/workloads/functional-query/queries/QueryTest/partition-col-types.test
@@ -220,7 +220,7 @@ DROP TABLE all_insert_partition_col_types;
 ---- QUERY
 # Regression test for IMPALA-1026
 drop table if exists test_dec_partition;
-create table test_dec_partition(id int, dec decimal(5,4))
+create table test_dec_partition(id int, `dec` decimal(5,4))
   partitioned by(decimal_col DECIMAL(5,4));
 alter table test_dec_partition drop if exists partition(decimal_col=4.34);
 insert into test_dec_partition partition(decimal_col=4.34) values (1, 3.14);

http://git-wip-us.apache.org/repos/asf/impala/blob/f0b3d9d1/testdata/workloads/functional-query/queries/QueryTest/single-node-nlj.test
----------------------------------------------------------------------
diff --git 
a/testdata/workloads/functional-query/queries/QueryTest/single-node-nlj.test 
b/testdata/workloads/functional-query/queries/QueryTest/single-node-nlj.test
index fa1ccfc..82370af 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/single-node-nlj.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/single-node-nlj.test
@@ -173,9 +173,9 @@ INT,INT
 ====
 ---- QUERY
 # Right non-equi-join with empty build.
-select straight_join at.id
-from alltypes at
-  right join functional.alltypestiny att on at.id < att.id
+select straight_join atp.id
+from alltypes atp
+  right join functional.alltypestiny att on atp.id < att.id
 where att.int_col = 999
 ---- RESULTS
 ---- TYPES
@@ -183,11 +183,11 @@ INT
 ====
 ---- QUERY
 # Full outer non-equi-join with empty build.
-select straight_join at.id
-from alltypes at
+select straight_join atp.id
+from alltypes atp
   full outer join (
-    select * from functional.alltypestiny where int_col = 999) att on at.id < 
att.id
-order by at.id desc
+    select * from functional.alltypestiny where int_col = 999) att on atp.id < 
att.id
+order by atp.id desc
 limit 5
 ---- RESULTS
 7299
@@ -200,19 +200,19 @@ INT
 ====
 ---- QUERY
 # Right semi non-equi-join with empty build.
-select straight_join at.id
+select straight_join atp.id
 from (select * from functional.alltypestiny att where int_col = 999) att
-  right semi join alltypes at on at.id < att.id
+  right semi join alltypes atp on atp.id < att.id
 ---- RESULTS
 ---- TYPES
 INT
 ====
 ---- QUERY
 # Right anti non-equi-join with empty build.
-select straight_join at.id
+select straight_join atp.id
 from (select * from functional.alltypestiny att where int_col = 999) att
-  right anti join alltypes at on at.id < att.id
-order by at.id desc
+  right anti join alltypes atp on atp.id < att.id
+order by atp.id desc
 limit 5
 ---- RESULTS
 7299

http://git-wip-us.apache.org/repos/asf/impala/blob/f0b3d9d1/testdata/workloads/functional-query/queries/QueryTest/spilling-large-rows.test
----------------------------------------------------------------------
diff --git 
a/testdata/workloads/functional-query/queries/QueryTest/spilling-large-rows.test
 
b/testdata/workloads/functional-query/queries/QueryTest/spilling-large-rows.test
index 9b61986..cdd6f21 100644
--- 
a/testdata/workloads/functional-query/queries/QueryTest/spilling-large-rows.test
+++ 
b/testdata/workloads/functional-query/queries/QueryTest/spilling-large-rows.test
@@ -55,20 +55,20 @@ int,bigint
 ====
 ---- QUERY
 # Row is too big to process in right side of hash join.
-select straight_join at.id, bs.id, at.string_col
-from functional.alltypes at
-  join bigstrs bs on repeat(at.string_col, 10000) = substring(bs.bigstr, 
5000000, 10000) and at.id = bs.id
-where at.id < 100
+select straight_join atp.id, bs.id, atp.string_col
+from functional.alltypes atp
+  join bigstrs bs on repeat(atp.string_col, 10000) = substring(bs.bigstr, 
5000000, 10000) and atp.id = bs.id
+where atp.id < 100
 ---- CATCH
 Row of size 9.54 MB could not be materialized in plan node with id 2. Increase 
the max_row_size query option (currently 512.00 KB) to process larger rows.
 ====
 ---- QUERY
 # Row is too big to process in right side of hash join.
 set max_row_size=18m;
-select straight_join at.id, bs.id, at.string_col
-from functional.alltypes at
-  join bigstrs bs on repeat(at.string_col, 10000) = substring(bs.bigstr, 
5000000, 10000) and at.id = bs.id
-where at.id < 100
+select straight_join atp.id, bs.id, atp.string_col
+from functional.alltypes atp
+  join bigstrs bs on repeat(atp.string_col, 10000) = substring(bs.bigstr, 
5000000, 10000) and atp.id = bs.id
+where atp.id < 100
 ---- TYPES
 int,int,string
 ---- RESULTS

http://git-wip-us.apache.org/repos/asf/impala/blob/f0b3d9d1/testdata/workloads/functional-query/queries/QueryTest/values.test
----------------------------------------------------------------------
diff --git a/testdata/workloads/functional-query/queries/QueryTest/values.test 
b/testdata/workloads/functional-query/queries/QueryTest/values.test
index ac33e3d..8630059 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/values.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/values.test
@@ -74,7 +74,7 @@ decimal
 # IMPALA-2749: Test that multiplying a DOUBLE and a DECIMAL results in a double
 # value and do not overflow.
 drop table if exists i_2749;
-create table i_2749 (dbl1 double, dec decimal(9,4), dbl2 double);
+create table i_2749 (dbl1 double, `dec` decimal(9,4), dbl2 double);
 insert overwrite table i_2749 values
     (0.0017,90,1.0113),
     (0.0342,90,1.0113),
@@ -82,7 +82,7 @@ insert overwrite table i_2749 values
     (0.0163,90,1.0113);
 ====
 ---- QUERY
-select dbl1 * dec * dbl2, dbl1 + dec, dbl1 - dec, dbl1 / dec from i_2749;
+select dbl1 * `dec` * dbl2, dbl1 + `dec`, dbl1 - `dec`, dbl1 / `dec` from 
i_2749;
 ---- RESULTS
 0.1547289,90.0017000000000000,-89.9983000000000000,0.0000188888889
 3.112781400000001,90.0342000000000000,-89.9658000000000000,0.0003800000000
@@ -92,7 +92,7 @@ select dbl1 * dec * dbl2, dbl1 + dec, dbl1 - dec, dbl1 / dec 
from i_2749;
 DOUBLE,DECIMAL,DECIMAL,DECIMAL
 ====
 ---- QUERY
-select dbl1 * dbl2 * dec from i_2749;
+select dbl1 * dbl2 * `dec` from i_2749;
 ---- RESULTS
 0.1547289
 3.112781400000001

http://git-wip-us.apache.org/repos/asf/impala/blob/f0b3d9d1/tests/custom_cluster/test_reserved_words_version.py
----------------------------------------------------------------------
diff --git a/tests/custom_cluster/test_reserved_words_version.py 
b/tests/custom_cluster/test_reserved_words_version.py
new file mode 100644
index 0000000..424d6bb
--- /dev/null
+++ b/tests/custom_cluster/test_reserved_words_version.py
@@ -0,0 +1,38 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import pytest
+
+from tests.common.custom_cluster_test_suite import CustomClusterTestSuite
+
+
+class TestReservedWordsVersion(CustomClusterTestSuite):
+  @pytest.mark.execute_serially
+  @CustomClusterTestSuite.with_args("--reserved_words_version=3.0.0")
+  def test_3_0(self):
+    assert "A reserved word cannot be used as an identifier: at" in \
+        str(self.execute_query_expect_failure(self.client, "select 1 as at"))
+    self.execute_query_expect_success(self.client, "select 1 as `at`")
+    self.execute_query_expect_success(self.client, "select 1 as year")
+    self.execute_query_expect_success(self.client, "select 1 as avg")
+
+  @pytest.mark.execute_serially
+  @CustomClusterTestSuite.with_args("--reserved_words_version=2.11.0")
+  def test_2_11(self):
+    self.execute_query_expect_success(self.client, "select 1 as at")
+    self.execute_query_expect_success(self.client, "select 1 as year")
+    self.execute_query_expect_success(self.client, "select 1 as avg")

http://git-wip-us.apache.org/repos/asf/impala/blob/f0b3d9d1/tests/custom_cluster/test_stats_extrapolation.py
----------------------------------------------------------------------
diff --git a/tests/custom_cluster/test_stats_extrapolation.py 
b/tests/custom_cluster/test_stats_extrapolation.py
index 65aa9f1..42c3820 100644
--- a/tests/custom_cluster/test_stats_extrapolation.py
+++ b/tests/custom_cluster/test_stats_extrapolation.py
@@ -76,7 +76,7 @@ class TestStatsExtrapolation(CustomClusterTestSuite):
     self.__run_sampling_test(nopart_test_tbl, "", nopart_test_tbl_exp, 100, 99)
 
     # Test empty table.
-    empty_test_tbl = unique_database + ".empty"
+    empty_test_tbl = unique_database + ".empty_tbl"
     self.clone_table("functional.alltypes", empty_test_tbl, False, vector)
     self.__run_sampling_test(empty_test_tbl, "", empty_test_tbl, 10, 7)
 

http://git-wip-us.apache.org/repos/asf/impala/blob/f0b3d9d1/tests/query_test/test_sort.py
----------------------------------------------------------------------
diff --git a/tests/query_test/test_sort.py b/tests/query_test/test_sort.py
index 0eae035..59a28cd 100644
--- a/tests/query_test/test_sort.py
+++ b/tests/query_test/test_sort.py
@@ -142,10 +142,10 @@ class TestQueryFullSort(ImpalaTestSuite):
     has to be handled differently because there are no var len blocks to point 
into."""
 
     query = """
-    select empty, l_orderkey, l_partkey, l_suppkey,
+    select empty_str, l_orderkey, l_partkey, l_suppkey,
         l_linenumber, l_quantity, l_extendedprice, l_discount, l_tax
-    from (select substr(l_comment, 1000, 0) empty, * from lineitem) t
-    order by empty, l_orderkey, l_partkey, l_suppkey, l_linenumber
+    from (select substr(l_comment, 1000, 0) empty_str, * from lineitem) t
+    order by empty_str, l_orderkey, l_partkey, l_suppkey, l_linenumber
     limit 100000
     """
 

Reply via email to