blob: 6c750c3bbd552fdd5a79a0e96715238378cb8d28 [file] [log] [blame]
====
---- QUERY
create table testtbl1(`세율대분류구분코드` int, s string COMMENT 'String col') stored as TEXTFILE;
---- RESULTS
'Table has been created.'
====
---- 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 testtbl1(`세율대분류구분코드` int, s string)
STORED AS TEXTFILE;
---- RESULTS
'Table already exists.'
====
---- QUERY
show tables;
---- RESULTS
'testtbl1'
---- TYPES
STRING
====
---- QUERY
describe testtbl1;
---- RESULTS: RAW_STRING
'세율대분류구분코드','int',''
's','string','String col'
---- TYPES
STRING, STRING, STRING
====
---- QUERY
insert into table testtbl1 values(1, 'Alice');
====
---- QUERY
select * from testtbl1;
---- RESULTS
1,'Alice'
---- TYPES
INT, STRING
====
---- QUERY
drop table testtbl1;
---- RESULTS
'Table has been dropped.'
====
---- QUERY
create table testtbl_kudu(`시스템처리최종사용자번호a` int, s string COMMENT 'String col',
Primary key(`시스템처리최종사용자번호a`)) stored as KUDU;
---- RESULTS
'Table has been created.'
====
---- QUERY
show tables;
---- RESULTS
'testtbl_kudu'
---- TYPES
STRING
====
---- QUERY
describe testtbl_kudu;
---- RESULTS: RAW_STRING
'시스템처리최종사용자번호a','int','','true','true','false','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
's','string','String col','false','','true','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'
---- TYPES
STRING, STRING, STRING, STRING, STRING, STRING, STRING, STRING, STRING, STRING
====
---- QUERY
insert into table testtbl_kudu values(1, 'Alice');
====
---- QUERY
select * from testtbl_kudu;
---- RESULTS
1,'Alice'
---- TYPES
INT, STRING
====
---- QUERY
drop table testtbl_kudu;
---- RESULTS
'Table has been dropped.'
====
---- QUERY
create table testtbl_iceberg(`我` int, s string COMMENT 'String col') stored as ICEBERG;
---- RESULTS
'Table has been created.'
====
---- 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 testtbl_iceberg(`我` int, s string)
STORED AS ICEBERG;
---- RESULTS
'Table already exists.'
====
---- QUERY
show tables;
---- RESULTS
'testtbl_iceberg'
---- TYPES
STRING
====
---- QUERY
describe testtbl_iceberg;
---- RESULTS: RAW_STRING
'我','int','','true'
's','string','String col','true'
---- TYPES
STRING, STRING, STRING, STRING
====
---- QUERY
insert into table testtbl_iceberg values(1, 'Alice');
====
---- QUERY
select * from testtbl_iceberg;
---- RESULTS
1,'Alice'
---- TYPES
INT, STRING
====
---- QUERY
drop table testtbl_iceberg;
---- RESULTS
'Table has been dropped.'
====
---- QUERY
create table $DATABASE.testtbl_orc(`我` int, s string COMMENT 'String col') stored as ORC;
---- RESULTS
'Table has been created.'
====
---- 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 $DATABASE.testtbl_orc(`我` int, s string)
STORED AS ORC;
---- RESULTS
'Table already exists.'
====
---- QUERY
show tables;
---- RESULTS
'testtbl_orc'
---- TYPES
STRING
====
---- QUERY
describe $DATABASE.testtbl_orc;
---- RESULTS: RAW_STRING
'我','int',''
's','string','String col'
---- TYPES
STRING, STRING, STRING
====
---- IS_HDFS_ONLY
---- HIVE_QUERY
insert into table $DATABASE.testtbl_orc values(1, 'Alice');
====
---- IS_HDFS_ONLY
---- HIVE_QUERY
select * from $DATABASE.testtbl_orc;
---- RESULTS
1,'Alice'
---- TYPES
INT, STRING
====
---- QUERY
drop table $DATABASE.testtbl_orc;
---- RESULTS
'Table has been dropped.'
====
---- QUERY
create table $DATABASE.testtbl_avro(`我` int, s string COMMENT 'String col') stored as AVRO;
---- RESULTS
'Table has been created.'
====
---- 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 $DATABASE.testtbl_avro(`我` int, s string)
STORED AS AVRO;
---- RESULTS
'Table already exists.'
====
---- QUERY
show tables;
---- RESULTS
'testtbl_avro'
---- TYPES
STRING
====
---- QUERY
describe $DATABASE.testtbl_avro;
---- RESULTS: RAW_STRING
'我','int','from deserializer'
's','string','String col'
---- TYPES
STRING, STRING, STRING
====
---- IS_HDFS_ONLY
---- HIVE_QUERY
insert into table $DATABASE.testtbl_avro values(1, 'Alice');
====
---- IS_HDFS_ONLY
---- HIVE_QUERY
select * from $DATABASE.testtbl_avro;
---- RESULTS
1,'Alice'
---- TYPES
INT, STRING
====
---- QUERY
drop table $DATABASE.testtbl_avro;
---- RESULTS
'Table has been dropped.'
====
---- QUERY
create table testtbl_part(`我` int, s string) PARTITIONED BY (`고객` int comment 'C') stored as TEXTFILE;
---- RESULTS
'Table has been created.'
====
---- QUERY
# Partition columns are displayed as part of DESCRIBE <table>
describe testtbl_part;
---- RESULTS: RAW_STRING
'我','int',''
's','string',''
'고객','int','C'
---- TYPES
STRING, STRING, STRING
====
---- QUERY
insert into table testtbl_part partition(`고객`=24) values(1, 'Alice');
====
---- QUERY
insert into table testtbl_part partition(`고객`=20) values(2, 'Alison');
====
---- QUERY
insert into table testtbl_part partition(`고객`=23) values(3, 'Zack');
====
---- QUERY
select * from testtbl_part;
---- RESULTS
1,'Alice',24
2,'Alison',20
3,'Zack',23
---- TYPES
INT, STRING, INT
====
---- QUERY
drop table testtbl_part;
---- RESULTS
'Table has been dropped.'
====
---- QUERY
create table testtbl_parquet(`我` int, s string COMMENT 'String col') stored as PARQUET;
---- RESULTS
'Table has been created.'
====
---- 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 testtbl_parquet(`我` int, s string)
STORED AS PARQUET;
---- RESULTS
'Table already exists.'
====
---- QUERY
show tables;
---- RESULTS
'testtbl_parquet'
---- TYPES
STRING
====
---- QUERY
describe testtbl_parquet;
---- RESULTS: RAW_STRING
'我','int',''
's','string','String col'
---- TYPES
STRING, STRING, STRING
====
---- QUERY
insert into table testtbl_parquet values(1, 'Alice');
====
---- QUERY
select * from testtbl_parquet;
---- RESULTS
1,'Alice'
---- TYPES
INT, STRING
====
---- QUERY
drop table testtbl_parquet;
---- RESULTS
'Table has been dropped.'
====
---- QUERY
# Tests for IMPALA-11499
create table unicode_partition_values (id int) partitioned by (p string) stored as parquet;
---- RESULTS
'Table has been created.'
====
---- QUERY
insert into unicode_partition_values partition(p='运营业务数据') values (0);
insert into unicode_partition_values partition(p='运') values (0);
insert into unicode_partition_values partition(p='运营业务数据1234567890!@#$%^&*(){}[]') values (0);
select * from unicode_partition_values;
---- RESULTS: RAW_STRING
0,'运'
0,'运营业务数据'
0,'运营业务数据1234567890!@#$%^&*(){}[]'
---- TYPES
INT, STRING
====
---- QUERY
show files in unicode_partition_values;
---- RESULTS: RAW_STRING
row_regex:'$NAMENODE/test-warehouse/$DATABASE\.db/unicode_partition_values/p=运/.*\.parq','.*','p=运','$ERASURECODE_POLICY'
row_regex:'$NAMENODE/test-warehouse/$DATABASE\.db/unicode_partition_values/p=运营业务数据1234567890!@%23\$%25%5E&%2A\(\)%7B}%5B%5D/.*\.parq','.*','p=运营业务数据1234567890!@%23\$%25%5E&%2A\(\)%7B}%5B%5D','$ERASURECODE_POLICY'
row_regex:'$NAMENODE/test-warehouse/$DATABASE\.db/unicode_partition_values/p=运营业务数据/.*\.parq','.*','p=运营业务数据','$ERASURECODE_POLICY'
---- TYPES
STRING, STRING, STRING, STRING
====
---- QUERY
select * from unicode_partition_values
where p like '运%';
---- RESULTS: RAW_STRING
0,'运'
0,'运营业务数据'
0,'运营业务数据1234567890!@#$%^&*(){}[]'
---- TYPES
INT, STRING
====
---- QUERY
create table unicode_partition_values_iceberg (id int, p string) partitioned by spec (identity(p)) stored by iceberg;
---- RESULTS
'Table has been created.'
====
---- QUERY
insert into unicode_partition_values_iceberg values (0, '运营业务数据');
insert into unicode_partition_values_iceberg values (0, '运');
insert into unicode_partition_values_iceberg values (0, '运营业务数据1234567890!@#$%^&*(){}[]');
select * from unicode_partition_values_iceberg;
---- RESULTS: RAW_STRING
0,'运'
0,'运营业务数据'
0,'运营业务数据1234567890!@#$%^&*(){}[]'
---- TYPES
INT, STRING
====
---- QUERY
show files in unicode_partition_values_iceberg;
---- RESULTS
row_regex:'$NAMENODE/test-warehouse/$DATABASE\.db/unicode_partition_values_iceberg/data/p=%E8%BF%90/.*\.parq','.*','','$ERASURECODE_POLICY'
row_regex:'$NAMENODE/test-warehouse/$DATABASE\.db/unicode_partition_values_iceberg/data/p=%E8%BF%90%E8%90%A5%E4%B8%9A%E5%8A%A1%E6%95%B0%E6%8D%AE1234567890%21%40%23%24%25%5E%26\*%28%29%7B%7D%5B%5D/.*\.parq','.*','','$ERASURECODE_POLICY'
row_regex:'$NAMENODE/test-warehouse/$DATABASE\.db/unicode_partition_values_iceberg/data/p=%E8%BF%90%E8%90%A5%E4%B8%9A%E5%8A%A1%E6%95%B0%E6%8D%AE/.*\.parq','.*','','$ERASURECODE_POLICY'
---- TYPES
STRING, STRING, STRING, STRING
====
---- QUERY
insert into unicode_partition_values_iceberg values (2, '运营业务数据');
select * from unicode_partition_values_iceberg
where p = '运营业务数据';
---- RESULTS: RAW_STRING
0,'运营业务数据'
2,'运营业务数据'
---- TYPES
INT, STRING
---- RUNTIME_PROFILE
aggregation(SUM, RowsRead): 2
aggregation(SUM, NumRowGroups): 2
====