mirror of
https://github.com/apache/impala.git
synced 2025-12-31 15:00:10 -05:00
We need to skip queries that select from tables wiht nested types is running with the old aggs and joins. To achieve this, move the failing test to a separate test and use the skip decorator. Change-Id: Iaf1351c711b524be66a99084657926909425cbff Reviewed-on: http://gerrit.cloudera.org:8080/2272 Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com> Tested-by: Internal Jenkins
204 lines
6.7 KiB
Plaintext
204 lines
6.7 KiB
Plaintext
====
|
|
---- QUERY
|
|
drop table if exists ddl_test_db.temp_legacy_table
|
|
---- RESULTS
|
|
====
|
|
---- QUERY
|
|
create table ddl_test_db.temp_legacy_table like parquet
|
|
'$FILESYSTEM_PREFIX/test-warehouse/schemas/legacy_nested.parquet'
|
|
---- RESULTS
|
|
====
|
|
---- QUERY
|
|
describe ddl_test_db.temp_legacy_table
|
|
---- RESULTS
|
|
't_long','bigint','Inferred from Parquet file.'
|
|
't_struct','struct<\n f_int:int,\n t_struct:struct<\n f_int:int,\n f_int2:int\n >,\n int_arr:array<int>,\n int_map:map<string,int>\n>','Inferred from Parquet file.'
|
|
't_array_basic','array<int>','Inferred from Parquet file.'
|
|
't_array_struct','array<struct<\n f_int1:int,\n f_int2:int,\n f_int3:int\n>>','Inferred from Parquet file.'
|
|
't_array_array','array<array<int>>','Inferred from Parquet file.'
|
|
't_array_map','array<map<string,int>>','Inferred from Parquet file.'
|
|
'map_int','map<string,int>','Inferred from Parquet file.'
|
|
'map_struct','map<string,struct<\n f_int:int,\n f_int2:int\n>>','Inferred from Parquet file.'
|
|
'map_array','map<string,array<int>>','Inferred from Parquet file.'
|
|
'map_map','map<string,map<string,int>>','Inferred from Parquet file.'
|
|
---- TYPES
|
|
STRING, STRING, STRING
|
|
====
|
|
---- QUERY
|
|
drop table if exists ddl_test_db.temp_legacy_table
|
|
---- RESULTS
|
|
====
|
|
---- QUERY
|
|
drop table if exists ddl_test_db.temp_modern_table
|
|
---- RESULTS
|
|
====
|
|
---- QUERY
|
|
create table ddl_test_db.temp_modern_table like parquet
|
|
'$FILESYSTEM_PREFIX/test-warehouse/schemas/modern_nested.parquet'
|
|
---- RESULTS
|
|
====
|
|
---- QUERY
|
|
describe ddl_test_db.temp_modern_table
|
|
---- RESULTS
|
|
't_long','bigint','Inferred from Parquet file.'
|
|
't_struct','struct<\n f_int:int,\n t_struct:struct<\n f_int:int,\n f_int2:int\n >,\n int_arr:array<int>,\n int_map:map<string,int>\n>','Inferred from Parquet file.'
|
|
't_array_basic','array<int>','Inferred from Parquet file.'
|
|
't_array_struct','array<struct<\n f_int1:int,\n f_int2:int,\n f_int3:int\n>>','Inferred from Parquet file.'
|
|
't_array_array','array<array<int>>','Inferred from Parquet file.'
|
|
't_array_map','array<map<string,int>>','Inferred from Parquet file.'
|
|
'map_int','map<string,int>','Inferred from Parquet file.'
|
|
'map_struct','map<string,struct<\n f_int:int,\n f_int2:int\n>>','Inferred from Parquet file.'
|
|
'map_array','map<string,array<int>>','Inferred from Parquet file.'
|
|
'map_map','map<string,map<string,int>>','Inferred from Parquet file.'
|
|
---- TYPES
|
|
STRING, STRING, STRING
|
|
====
|
|
---- QUERY
|
|
drop table if exists ddl_test_db.temp_modern_table
|
|
---- RESULTS
|
|
====
|
|
---- QUERY
|
|
drop table if exists allcomplextypes_clone
|
|
---- RESULTS
|
|
====
|
|
---- QUERY
|
|
create table allcomplextypes_clone like functional.allcomplextypes
|
|
stored as parquet
|
|
---- RESULTS
|
|
====
|
|
---- QUERY
|
|
describe allcomplextypes_clone
|
|
---- RESULTS
|
|
'id','int',''
|
|
'int_array_col','array<int>',''
|
|
'array_array_col','array<array<int>>',''
|
|
'map_array_col','array<map<string,int>>',''
|
|
'struct_array_col','array<struct<\n f1:bigint,\n f2:string\n>>',''
|
|
'int_map_col','map<string,int>',''
|
|
'array_map_col','map<string,array<int>>',''
|
|
'map_map_col','map<string,map<string,int>>',''
|
|
'struct_map_col','map<string,struct<\n f1:bigint,\n f2:string\n>>',''
|
|
'int_struct_col','struct<\n f1:int,\n f2:int\n>',''
|
|
'complex_struct_col','struct<\n f1:int,\n f2:array<int>,\n f3:map<string,int>\n>',''
|
|
'nested_struct_col','struct<\n f1:int,\n f2:struct<\n f11:bigint,\n f12:struct<\n f21:bigint\n >\n >\n>',''
|
|
'complex_nested_struct_col','struct<\n f1:int,\n f2:array<struct<\n f11:bigint,\n f12:map<string,struct<\n f21:bigint\n >>\n >>\n>',''
|
|
'year','int',''
|
|
'month','int',''
|
|
---- TYPES
|
|
STRING, STRING, STRING
|
|
====
|
|
---- QUERY
|
|
drop table allcomplextypes_clone
|
|
---- RESULTS
|
|
====
|
|
---- QUERY
|
|
# IMPALA-2820: Test keywords as struct-field names. All field names below are
|
|
# Impala keywords, but only some of them are quoted to show that a mix of
|
|
# quoted/unquoted identifiers is possible.
|
|
create table ddl_test_db.struct_keywords (
|
|
s struct<table:int,`comment`:string,`select`:decimal(8,2)>,
|
|
a array<struct<`replace`:boolean,`location`:varchar(10)>>,
|
|
m map<string,struct<`fields`:int,from:timestamp>>
|
|
)
|
|
partitioned by (year int, month int);
|
|
describe ddl_test_db.struct_keywords;
|
|
---- RESULTS
|
|
's','struct<\n table:int,\n comment:string,\n select:decimal(8,2)\n>',''
|
|
'a','array<struct<\n replace:boolean,\n location:varchar(10)\n>>',''
|
|
'm','map<string,struct<\n fields:int,\n from:timestamp\n>>',''
|
|
'year','int',''
|
|
'month','int',''
|
|
---- TYPES
|
|
STRING, STRING, STRING
|
|
====
|
|
---- QUERY
|
|
# Test creating a partitioned Avro table without an Avro schema.
|
|
# The Avro schema is inferred from the column definitions.
|
|
create table no_avro_schema (
|
|
c1 tinyint,
|
|
c2 smallint comment 'becomes int',
|
|
c3 int,
|
|
c4 bigint,
|
|
c5 float,
|
|
c6 double,
|
|
c7 timestamp comment 'becomes string',
|
|
c8 string,
|
|
c9 char(10) comment 'preserved',
|
|
c10 varchar(20),
|
|
c11 decimal(10, 5),
|
|
c12 struct<f1:int,f2:string>,
|
|
c13 array<int>,
|
|
c14 map<string,string>)
|
|
partitioned by (year int, month int)
|
|
stored as avro
|
|
---- RESULTS
|
|
====
|
|
---- QUERY
|
|
describe no_avro_schema
|
|
---- RESULTS
|
|
'c1','int','from deserializer'
|
|
'c2','int','becomes int'
|
|
'c3','int','from deserializer'
|
|
'c4','bigint','from deserializer'
|
|
'c5','float','from deserializer'
|
|
'c6','double','from deserializer'
|
|
'c7','string','becomes string'
|
|
'c8','string','from deserializer'
|
|
'c9','char(10)','preserved'
|
|
'c10','varchar(20)','from deserializer'
|
|
'c11','decimal(10,5)','from deserializer'
|
|
'c12','struct<\n f1:int,\n f2:string\n>','from deserializer'
|
|
'c13','array<int>','from deserializer'
|
|
'c14','map<string,string>','from deserializer'
|
|
'year','int',''
|
|
'month','int',''
|
|
---- TYPES
|
|
STRING, STRING, STRING
|
|
====
|
|
---- QUERY
|
|
# Test creating an Avro table without an Avro schema via CREATE TABLE LIKE (IMPALA-1813)
|
|
create table like_no_avro_schema like no_avro_schema stored as avro
|
|
---- RESULTS
|
|
====
|
|
---- QUERY
|
|
describe like_no_avro_schema
|
|
---- RESULTS
|
|
'c1','int','from deserializer'
|
|
'c2','int','becomes int'
|
|
'c3','int','from deserializer'
|
|
'c4','bigint','from deserializer'
|
|
'c5','float','from deserializer'
|
|
'c6','double','from deserializer'
|
|
'c7','string','becomes string'
|
|
'c8','string','from deserializer'
|
|
'c9','char(10)','preserved'
|
|
'c10','varchar(20)','from deserializer'
|
|
'c11','decimal(10,5)','from deserializer'
|
|
'c12','struct<\n f1:int,\n f2:string\n>','from deserializer'
|
|
'c13','array<int>','from deserializer'
|
|
'c14','map<string,string>','from deserializer'
|
|
'year','int',''
|
|
'month','int',''
|
|
---- TYPES
|
|
STRING, STRING, STRING
|
|
====
|
|
---- QUERY
|
|
drop table like_no_avro_schema
|
|
---- RESULTS
|
|
====
|
|
---- QUERY
|
|
drop table no_avro_schema
|
|
---- RESULTS
|
|
====
|
|
---- QUERY
|
|
select
|
|
s.`table`, s.`comment`, s.`select`,
|
|
a.`replace`, a.`location`,
|
|
m.key, m.`fields`, m.`from`,
|
|
year, month
|
|
from ddl_test_db.struct_keywords t, t.a, t.m
|
|
---- RESULTS
|
|
---- TYPES
|
|
INT, STRING, DECIMAL, BOOLEAN, STRING, STRING, INT, TIMESTAMP, INT, INT
|
|
====
|