mirror of
https://github.com/apache/impala.git
synced 2026-01-07 09:02:19 -05:00
Create tables used by insert tests in a supported insert format
This commit is contained in:
committed by
Henry Robinson
parent
ac7fb11da3
commit
5f81becd84
@@ -141,7 +141,7 @@ NULL,10,450,900,10,1089
|
||||
====
|
||||
---- QUERY
|
||||
# count distinct order by the same agg expr
|
||||
select count(distinct id) as count_id from functional.alltypessmall order by count_id limit 100
|
||||
select count(distinct id) as count_id from alltypessmall order by count_id limit 100
|
||||
---- TYPES
|
||||
bigint
|
||||
---- RESULTS
|
||||
@@ -149,7 +149,7 @@ bigint
|
||||
====
|
||||
---- QUERY
|
||||
# count distinct order by a diff agg expr
|
||||
select count(distinct id) as sum_id from functional.alltypessmall order by max(distinct id)
|
||||
select count(distinct id) as sum_id from alltypessmall order by max(distinct id)
|
||||
limit 100
|
||||
---- TYPES
|
||||
bigint
|
||||
|
||||
@@ -360,7 +360,7 @@ bigint
|
||||
#891,891,890109,890109,8892188910,8892188910,9771626610293.455,9771626610293.455,9.859473533519994e+16,9.859473533519994e+16
|
||||
#====
|
||||
# LIKE exprs w/ the like/regex pattern coming from a column
|
||||
select * from functional.LikeTbl
|
||||
select * from LikeTbl
|
||||
---- TYPES
|
||||
string, string, string, string, string
|
||||
---- RESULTS
|
||||
@@ -381,7 +381,7 @@ string, string, string, string, string
|
||||
'two','%two%','n%two%','.*two.*','n.*two.*'
|
||||
====
|
||||
---- QUERY
|
||||
select str_col, match_like_col from functional.LikeTbl
|
||||
select str_col, match_like_col from LikeTbl
|
||||
where str_col LIKE match_like_col
|
||||
---- TYPES
|
||||
string, string
|
||||
@@ -402,14 +402,14 @@ string, string
|
||||
'','%'
|
||||
====
|
||||
---- QUERY
|
||||
select str_col, match_like_col from functional.LikeTbl
|
||||
select str_col, match_like_col from LikeTbl
|
||||
where str_col NOT LIKE match_like_col
|
||||
---- TYPES
|
||||
string, string
|
||||
---- RESULTS
|
||||
====
|
||||
---- QUERY
|
||||
select str_col, match_like_col from functional.LikeTbl
|
||||
select str_col, match_like_col from LikeTbl
|
||||
where str_col LIKE no_match_like_col
|
||||
---- TYPES
|
||||
string, string
|
||||
@@ -417,7 +417,7 @@ string, string
|
||||
'','%'
|
||||
====
|
||||
---- QUERY
|
||||
select str_col, no_match_like_col from functional.LikeTbl
|
||||
select str_col, no_match_like_col from LikeTbl
|
||||
where str_col NOT LIKE no_match_like_col
|
||||
---- TYPES
|
||||
string, string
|
||||
@@ -437,7 +437,7 @@ string, string
|
||||
'two','n%two%'
|
||||
====
|
||||
---- QUERY
|
||||
select str_col, match_regex_col from functional.LikeTbl
|
||||
select str_col, match_regex_col from LikeTbl
|
||||
where str_col REGEXP match_regex_col
|
||||
---- TYPES
|
||||
string, string
|
||||
@@ -458,21 +458,21 @@ string, string
|
||||
'','.*'
|
||||
====
|
||||
---- QUERY
|
||||
select str_col, no_match_regex_col from functional.LikeTbl
|
||||
select str_col, no_match_regex_col from LikeTbl
|
||||
where str_col REGEXP no_match_regex_col
|
||||
---- TYPES
|
||||
string, string
|
||||
---- RESULTS
|
||||
====
|
||||
---- QUERY
|
||||
select str_col, match_regex_col from functional.LikeTbl
|
||||
select str_col, match_regex_col from LikeTbl
|
||||
where str_col NOT REGEXP match_regex_col
|
||||
---- TYPES
|
||||
string, string
|
||||
---- RESULTS
|
||||
====
|
||||
---- QUERY
|
||||
select str_col, no_match_regex_col from functional.LikeTbl
|
||||
select str_col, no_match_regex_col from LikeTbl
|
||||
where str_col NOT REGEXP no_match_regex_col
|
||||
---- TYPES
|
||||
string, string
|
||||
@@ -913,7 +913,7 @@ timestamp, timestamp, timestamp, timestamp
|
||||
regex: (\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}(\.\d{9})?),\1,\1,\1
|
||||
====
|
||||
---- QUERY
|
||||
select now(), now(), now(), now() from functional.alltypestiny
|
||||
select now(), now(), now(), now() from alltypestiny
|
||||
---- TYPES
|
||||
timestamp, timestamp, timestamp, timestamp
|
||||
---- RESULTS
|
||||
@@ -930,7 +930,7 @@ regex: (\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}(\.\d{9})?),\1,\1,\1
|
||||
---- QUERY
|
||||
# Check that now() returns the same value when evaluated on different nodes
|
||||
# (alltypessmall is partitioned)
|
||||
select min(now()), max(now()) from functional.alltypessmall
|
||||
select min(now()), max(now()) from alltypessmall
|
||||
---- TYPES
|
||||
timestamp, timestamp
|
||||
---- RESULTS
|
||||
|
||||
@@ -330,7 +330,7 @@ bigint
|
||||
====
|
||||
---- QUERY
|
||||
# show that the hdfs table has identical results
|
||||
select count(*) from functional.alltypesagg where smallint_col is null and string_col is not null
|
||||
select count(*) from alltypesagg where smallint_col is null and string_col is not null
|
||||
---- TYPES
|
||||
bigint
|
||||
---- RESULTS
|
||||
@@ -348,7 +348,7 @@ bigint
|
||||
====
|
||||
---- QUERY
|
||||
# Compare this hdfs-equivalent query with the above one.
|
||||
select count(*) from functional.alltypesagg where smallint_col is null
|
||||
select count(*) from alltypesagg where smallint_col is null
|
||||
---- TYPES
|
||||
bigint
|
||||
---- RESULTS
|
||||
|
||||
@@ -72,7 +72,7 @@ insert overwrite table alltypesinsert
|
||||
partition (year=2009, month=4)
|
||||
select id, bool_col, tinyint_col, smallint_col, int_col, bigint_col,
|
||||
float_col, double_col, date_string_col, string_col, timestamp_col
|
||||
from functional.alltypessmall
|
||||
from alltypessmall
|
||||
where year=2009 and month=4
|
||||
---- SETUP
|
||||
DROP PARTITIONS alltypesinsert
|
||||
@@ -121,7 +121,7 @@ insert into table alltypesinsert
|
||||
partition (year=2009, month=4)
|
||||
select id, bool_col, tinyint_col, smallint_col, int_col, bigint_col,
|
||||
float_col, double_col, date_string_col, string_col, timestamp_col
|
||||
from functional.alltypessmall
|
||||
from alltypessmall
|
||||
where year=2009 and month=4
|
||||
---- SETUP
|
||||
DROP PARTITIONS alltypesinsert
|
||||
@@ -143,7 +143,7 @@ insert overwrite table alltypesinsert
|
||||
partition (year=2009, month)
|
||||
select id, bool_col, tinyint_col, smallint_col, int_col, bigint_col,
|
||||
float_col, double_col, date_string_col, string_col, timestamp_col, month
|
||||
from functional.alltypessmall
|
||||
from alltypessmall
|
||||
where year=2009 and month>1 and month<=4
|
||||
---- SETUP
|
||||
DROP PARTITIONS alltypesinsert
|
||||
@@ -243,7 +243,7 @@ insert into table alltypesinsert
|
||||
partition (year=2009, month)
|
||||
select id, bool_col, tinyint_col, smallint_col, int_col, bigint_col,
|
||||
float_col, double_col, date_string_col, string_col, timestamp_col, month
|
||||
from functional.alltypessmall
|
||||
from alltypessmall
|
||||
where year=2009 and month>=1 and month<4
|
||||
---- SETUP
|
||||
DROP PARTITIONS alltypesinsert
|
||||
@@ -267,7 +267,7 @@ insert overwrite table alltypesinsert
|
||||
partition (year, month)
|
||||
select id, bool_col, tinyint_col, smallint_col, int_col, bigint_col,
|
||||
float_col, double_col, date_string_col, string_col, timestamp_col, year, month
|
||||
from functional.alltypessmall
|
||||
from alltypessmall
|
||||
---- SETUP
|
||||
DROP PARTITIONS alltypesinsert
|
||||
---- RESULTS
|
||||
@@ -392,7 +392,7 @@ insert into table alltypesinsert
|
||||
partition (year, month)
|
||||
select id, bool_col, tinyint_col, smallint_col, int_col, bigint_col,
|
||||
float_col, double_col, date_string_col, string_col, timestamp_col, year, month
|
||||
from functional.alltypessmall
|
||||
from alltypessmall
|
||||
---- SETUP
|
||||
DROP PARTITIONS alltypesinsert
|
||||
---- RESULTS
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# insert overwrite into unpartitioned table
|
||||
insert overwrite table insert_overwrite_nopart
|
||||
select int_col
|
||||
from functional.tinyinttable
|
||||
from tinyinttable
|
||||
---- SETUP
|
||||
RESET insert_overwrite_nopart
|
||||
---- RESULTS
|
||||
@@ -33,7 +33,7 @@ int
|
||||
# Now do an overwrite that should delete what was just written
|
||||
insert overwrite table insert_overwrite_nopart
|
||||
select 10
|
||||
from functional.tinyinttable
|
||||
from tinyinttable
|
||||
---- RESULTS
|
||||
: 10
|
||||
====
|
||||
@@ -61,7 +61,7 @@ int
|
||||
# TODO: IMP-240 - Hive will delete data even for inserts that write nothing. When we fix IMP-240, this test should fail.
|
||||
insert overwrite table insert_overwrite_nopart
|
||||
select 3
|
||||
from functional.tinyinttable
|
||||
from tinyinttable
|
||||
limit 0
|
||||
---- RESULTS
|
||||
====
|
||||
@@ -77,7 +77,7 @@ bigint
|
||||
insert overwrite table insert_overwrite_partitioned
|
||||
PARTITION(col2=5)
|
||||
select int_col
|
||||
from functional.tinyinttable
|
||||
from tinyinttable
|
||||
---- SETUP
|
||||
RESET insert_overwrite_partitioned
|
||||
---- RESULTS
|
||||
@@ -107,7 +107,7 @@ int,int
|
||||
insert overwrite table insert_overwrite_partitioned
|
||||
PARTITION(col2=6)
|
||||
select int_col
|
||||
from functional.tinyinttable
|
||||
from tinyinttable
|
||||
---- SETUP
|
||||
RESET insert_overwrite_nopart
|
||||
---- RESULTS
|
||||
@@ -147,7 +147,7 @@ int,int
|
||||
# Overwrite one partition, check that the other partition remains intact
|
||||
insert overwrite table insert_overwrite_partitioned
|
||||
partition(col2=5)
|
||||
select 10 from functional.tinyinttable
|
||||
select 10 from tinyinttable
|
||||
---- RESULTS
|
||||
col2=5/: 10
|
||||
====
|
||||
@@ -184,7 +184,7 @@ int,int
|
||||
insert overwrite table insert_overwrite_partitioned
|
||||
partition(col2)
|
||||
select int_col, int_col
|
||||
from functional.tinyinttable
|
||||
from tinyinttable
|
||||
---- SETUP
|
||||
DROP PARTITIONS insert_overwrite_partitioned
|
||||
---- RESULTS
|
||||
@@ -223,7 +223,7 @@ int,int
|
||||
# Overwrite dynamic partition. Limit to 1 row without actually using limit, which forces non-parallel insert
|
||||
insert overwrite table insert_overwrite_partitioned
|
||||
partition(col2)
|
||||
select 10, 0 from functional.tinyinttable
|
||||
select 10, 0 from tinyinttable
|
||||
where int_col = 0
|
||||
---- RESULTS
|
||||
col2=0/: 1
|
||||
|
||||
Reference in New Issue
Block a user