You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2018/02/27 21:45:39 UTC

[4/5] impala git commit: IMPALA-6584: Fix TestKuduOperations::test_column_storage_attributes

IMPALA-6584: Fix TestKuduOperations::test_column_storage_attributes

In test_column_storage_attributes the column type is also used as
the column name. To ensure the type name is also a valid column
name, the default decimal type is now used.

Change-Id: Ia7a8c3a07e50e1b7e89192d15380caf8550e4945
Reviewed-on: http://gerrit.cloudera.org:8080/9455
Reviewed-by: Alex Behm <al...@cloudera.com>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/881600c0
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/881600c0
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/881600c0

Branch: refs/heads/master
Commit: 881600c070055a3b30855ed537a9632a7a36cab0
Parents: 5464c09
Author: Grant Henke <gh...@cloudera.com>
Authored: Sun Feb 25 13:37:31 2018 -0600
Committer: Impala Public Jenkins <im...@gerrit.cloudera.org>
Committed: Tue Feb 27 08:51:21 2018 +0000

----------------------------------------------------------------------
 tests/query_test/test_kudu.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/881600c0/tests/query_test/test_kudu.py
----------------------------------------------------------------------
diff --git a/tests/query_test/test_kudu.py b/tests/query_test/test_kudu.py
index 3d7b727..b0ced46 100644
--- a/tests/query_test/test_kudu.py
+++ b/tests/query_test/test_kudu.py
@@ -357,7 +357,7 @@ class TestKuduOperations(KuduTestSuite):
       pytest.skip("Only runs in exhaustive to reduce core time.")
     table_name = "%s.storage_attrs" % unique_database
     types = ['boolean', 'tinyint', 'smallint', 'int', 'bigint', 'float', 'double', \
-        'string', 'timestamp', 'decimal(9, 2)', 'decimal(18)', 'decimal(38, 38)']
+        'string', 'timestamp', 'decimal']
 
     create_query = "create table %s (id int primary key" % table_name
     for t in types:
@@ -378,10 +378,10 @@ class TestKuduOperations(KuduTestSuite):
           except Exception as err:
             assert "encoding %s not supported for type" % e in str(err)
         cursor.execute("""insert into %s values (%s, true, 0, 0, 0, 0, 0, 0, '0',
-            cast('2009-01-01' as timestamp))""" % (table_name, i))
+            cast('2009-01-01' as timestamp), cast(0 as decimal))""" % (table_name, i))
         cursor.execute("select * from %s where id = %s" % (table_name, i))
         assert cursor.fetchall() == \
-            [(i, True, 0, 0, 0, 0, 0.0, 0.0, '0', datetime(2009, 1, 1, 0, 0))]
+            [(i, True, 0, 0, 0, 0, 0.0, 0.0, '0', datetime(2009, 1, 1, 0, 0), 0)]
         i += 1
     cursor.execute("select count(*) from %s" % table_name)
     print cursor.fetchall() == [(i, )]