==== ---- QUERY create table ddl_test_db.temp_decimal_table like parquet '$FILESYSTEM_PREFIX/test-warehouse/schemas/decimal.parquet' ---- RESULTS ==== ---- QUERY describe ddl_test_db.temp_decimal_table ---- RESULTS 'd32','decimal(3,2)','Inferred from Parquet file.' 'd11','decimal(1,1)','Inferred from Parquet file.' 'd1015','decimal(15,10)','Inferred from Parquet file.' ---- TYPES STRING, STRING, STRING ==== ---- QUERY create table ddl_test_db.like_zipcodes_file like parquet '$FILESYSTEM_PREFIX/test-warehouse/schemas/zipcode_incomes.parquet' ---- RESULTS ==== ---- QUERY describe ddl_test_db.like_zipcodes_file ---- RESULTS 'id','string','Inferred from Parquet file.' 'zip','string','Inferred from Parquet file.' 'description1','string','Inferred from Parquet file.' 'description2','string','Inferred from Parquet file.' 'income','int','Inferred from Parquet file.' ---- TYPES STRING, STRING, STRING ==== ---- QUERY create table ddl_test_db.like_alltypestiny_file like parquet '$FILESYSTEM_PREFIX/test-warehouse/schemas/alltypestiny.parquet' ---- RESULTS ==== ---- QUERY describe ddl_test_db.like_alltypestiny_file ---- RESULTS 'id','int','Inferred from Parquet file.' 'bool_col','boolean','Inferred from Parquet file.' 'tinyint_col','int','Inferred from Parquet file.' 'smallint_col','int','Inferred from Parquet file.' 'int_col','int','Inferred from Parquet file.' 'bigint_col','bigint','Inferred from Parquet file.' 'float_col','float','Inferred from Parquet file.' 'double_col','double','Inferred from Parquet file.' 'date_string_col','string','Inferred from Parquet file.' 'string_col','string','Inferred from Parquet file.' 'timestamp_col','timestamp','Inferred from Parquet file.' ---- TYPES STRING, STRING, STRING ==== ---- QUERY # Make sure creating a table with the same name doesn't throw an error when # IF NOT EXISTS is specified. create table if not exists ddl_test_db.like_alltypestiny_file like parquet '$FILESYSTEM_PREFIX/test-warehouse/schemas/zipcode_incomes.parquet' ---- RESULTS ==== ---- QUERY # Should not have changed since last statement was IF NOT EXISTS. describe ddl_test_db.like_alltypestiny_file ---- RESULTS 'id','int','Inferred from Parquet file.' 'bool_col','boolean','Inferred from Parquet file.' 'tinyint_col','int','Inferred from Parquet file.' 'smallint_col','int','Inferred from Parquet file.' 'int_col','int','Inferred from Parquet file.' 'bigint_col','bigint','Inferred from Parquet file.' 'float_col','float','Inferred from Parquet file.' 'double_col','double','Inferred from Parquet file.' 'date_string_col','string','Inferred from Parquet file.' 'string_col','string','Inferred from Parquet file.' 'timestamp_col','timestamp','Inferred from Parquet file.' ---- TYPES STRING, STRING, STRING ==== ---- 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','' 'array_array_col','array>','' 'map_array_col','array>','' 'struct_array_col','array>','' 'int_map_col','map','' 'array_map_col','map>','' 'map_map_col','map>','' 'struct_map_col','map>','' 'int_struct_col','struct<\n f1:int,\n f2:int\n>','' 'complex_struct_col','struct<\n f1:int,\n f2:array,\n f3:map\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>\n >>\n>','' 'year','int','' 'month','int','' ---- TYPES STRING, STRING, STRING ==== ---- QUERY drop table allcomplextypes_clone ---- RESULTS ==== ---- 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,\n int_map:map\n>','Inferred from Parquet file.' 't_array_basic','array','Inferred from Parquet file.' 't_array_struct','array>','Inferred from Parquet file.' 't_array_array','array>','Inferred from Parquet file.' 't_array_map','array>','Inferred from Parquet file.' 'map_int','map','Inferred from Parquet file.' 'map_struct','map>','Inferred from Parquet file.' 'map_array','map>','Inferred from Parquet file.' 'map_map','map>','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,\n int_map:map\n>','Inferred from Parquet file.' 't_array_basic','array','Inferred from Parquet file.' 't_array_struct','array>','Inferred from Parquet file.' 't_array_array','array>','Inferred from Parquet file.' 't_array_map','array>','Inferred from Parquet file.' 'map_int','map','Inferred from Parquet file.' 'map_struct','map>','Inferred from Parquet file.' 'map_array','map>','Inferred from Parquet file.' 'map_map','map>','Inferred from Parquet file.' ---- TYPES STRING, STRING, STRING ==== ---- QUERY drop table if exists ddl_test_db.temp_modern_table ---- RESULTS ====