IMP-768: Enable the python test framework to check for insert results.

This commit is contained in:
ishaan
2013-02-27 18:10:19 -08:00
committed by Henry Robinson
parent 3ee82e7543
commit 5138a720bb
15 changed files with 59 additions and 118 deletions

View File

@@ -10,8 +10,7 @@ where year=2009 and month=04
RESET alltypesnopart_insert
RELOAD alltypesnopart_insert
---- RESULTS
---- PARTITIONS
/: 25
: 25
====
---- QUERY
# search the overwritten table to verify the results
@@ -57,8 +56,7 @@ where year=2009 and month=04
---- SETUP
RESET alltypesnopart_insert
---- RESULTS
---- PARTITIONS
/: 25
: 25
====
---- QUERY
# search the table to verify it contains 25 rows
@@ -80,8 +78,7 @@ where year=2009 and month=4
DROP PARTITIONS alltypesinsert
RESET alltypesinsert
---- RESULTS
---- PARTITIONS
/year=2009/month=4/: 25
year=2009/month=4/: 25
====
---- QUERY
# search the overwritten partition to verify the results
@@ -129,8 +126,7 @@ where year=2009 and month=4
---- SETUP
DROP PARTITIONS alltypesinsert
---- RESULTS
---- PARTITIONS
/year=2009/month=4/: 25
year=2009/month=4/: 25
====
---- QUERY
# search the partition to verify it contains all 25 rows
@@ -152,10 +148,9 @@ where year=2009 and month>1 and month<=4
---- SETUP
DROP PARTITIONS alltypesinsert
---- RESULTS
---- PARTITIONS
/year=2009/month=2/: 25
/year=2009/month=3/: 25
/year=2009/month=4/: 25
year=2009/month=2/: 25
year=2009/month=3/: 25
year=2009/month=4/: 25
====
---- QUERY
# search the overwritten partition to verify the results
@@ -253,13 +248,9 @@ where year=2009 and month>=1 and month<4
---- SETUP
DROP PARTITIONS alltypesinsert
---- RESULTS
year=2009/month=1/
year=2009/month=2/
year=2009/month=3/
---- PARTITIONS
/year=2009/month=1/: 25
/year=2009/month=2/: 25
/year=2009/month=3/: 25
year=2009/month=1/: 25
year=2009/month=2/: 25
year=2009/month=3/: 25
====
---- QUERY
# search the partitions to verify they contain all 75 rows
@@ -280,11 +271,10 @@ from functional.alltypessmall
---- SETUP
DROP PARTITIONS alltypesinsert
---- RESULTS
---- PARTITIONS
/year=2009/month=1/: 25
/year=2009/month=2/: 25
/year=2009/month=3/: 25
/year=2009/month=4/: 25
year=2009/month=1/: 25
year=2009/month=2/: 25
year=2009/month=3/: 25
year=2009/month=4/: 25
====
---- QUERY
# search the overwritten partition to verify the results
@@ -406,11 +396,10 @@ from functional.alltypessmall
---- SETUP
DROP PARTITIONS alltypesinsert
---- RESULTS
---- PARTITIONS
/year=2009/month=1/: 25
/year=2009/month=2/: 25
/year=2009/month=3/: 25
/year=2009/month=4/: 25
year=2009/month=1/: 25
year=2009/month=2/: 25
year=2009/month=3/: 25
year=2009/month=4/: 25
====
---- QUERY
# search the partitions to verify they contain all 100 rows
@@ -426,7 +415,7 @@ bigint
INSERT INTO TABLE insert_string_partitioned PARTITION(s2="/\%.") SELECT "value" FROM alltypessmall LIMIT 1;
---- SETUP
DROP PARTITIONS insert_string_partitioned
---- PARTITIONS
---- RESULTS
s2=%2F%5C%25./: 1
====
---- QUERY

View File

@@ -6,8 +6,7 @@ select NULL, "", "NULL", "\\N", NULL from alltypes limit 1
---- SETUP
RESET nullinsert
---- RESULTS
---- PARTITIONS
/: 1
: 1
====
---- QUERY
select * from nullinsert

View File

@@ -7,8 +7,7 @@ from functional.tinyinttable
---- SETUP
RESET insert_overwrite_nopart
---- RESULTS
---- PARTITIONS
/: 10
: 10
====
---- QUERY
# Check results - note larger limit than expected in case there's more data written than there should be
@@ -36,8 +35,7 @@ insert overwrite table insert_overwrite_nopart
select 10
from functional.tinyinttable
---- RESULTS
---- PARTITIONS
/: 10
: 10
====
---- QUERY
# check results from previous insert
@@ -66,7 +64,6 @@ select 3
from functional.tinyinttable
limit 0
---- RESULTS
---- PARTITIONS
====
---- QUERY
select count(*) from insert_overwrite_nopart
@@ -84,8 +81,7 @@ from functional.tinyinttable
---- SETUP
RESET insert_overwrite_partitioned
---- RESULTS
---- PARTITIONS
/col2=5/: 10
col2=5/: 10
====
---- QUERY
# Check results of previous insert
@@ -115,8 +111,7 @@ from functional.tinyinttable
---- SETUP
RESET insert_overwrite_nopart
---- RESULTS
---- PARTITIONS
/col2=6/: 10
col2=6/: 10
====
---- QUERY
# Check results of previous insert
@@ -154,8 +149,7 @@ insert overwrite table insert_overwrite_partitioned
partition(col2=5)
select 10 from functional.tinyinttable
---- RESULTS
---- PARTITIONS
/col2=5/: 10
col2=5/: 10
====
---- QUERY
# Confirm that one partition is still intact
@@ -194,17 +188,16 @@ from functional.tinyinttable
---- SETUP
DROP PARTITIONS insert_overwrite_partitioned
---- RESULTS
---- PARTITIONS
/col2=0/: 1
/col2=1/: 1
/col2=2/: 1
/col2=3/: 1
/col2=4/: 1
/col2=5/: 1
/col2=6/: 1
/col2=7/: 1
/col2=8/: 1
/col2=9/: 1
col2=0/: 1
col2=1/: 1
col2=2/: 1
col2=3/: 1
col2=4/: 1
col2=5/: 1
col2=6/: 1
col2=7/: 1
col2=8/: 1
col2=9/: 1
====
---- QUERY
# Confirm results of previous insert
@@ -233,8 +226,7 @@ partition(col2)
select 10, 0 from functional.tinyinttable
where int_col = 0
---- RESULTS
---- PARTITIONS
/col2=0/: 1
col2=0/: 1
====
---- QUERY
select col1, col2