Improve COPY shard-pruning test

pull/390/head
Marco Slot 2016-03-01 00:31:24 +01:00
parent 760f762de9
commit be86f40f4c
2 changed files with 7 additions and 5 deletions

View File

@ -135,7 +135,8 @@ WHERE shardid = :new_shard_id;
COPY customer_copy_range FROM '@abs_srcdir@/data/customer.1.data' WITH (DELIMITER '|'); COPY customer_copy_range FROM '@abs_srcdir@/data/customer.1.data' WITH (DELIMITER '|');
-- Check whether data went into the right shard (maybe) -- Check whether data went into the right shard (maybe)
SELECT count(*) FROM customer_copy_range WHERE c_custkey = 1; SELECT min(c_custkey), max(c_custkey), avg(c_custkey), count(*)
FROM customer_copy_range WHERE c_custkey <= 500;
-- Check whether data was copied -- Check whether data was copied
SELECT count(*) FROM customer_copy_range; SELECT count(*) FROM customer_copy_range;

View File

@ -158,10 +158,11 @@ WHERE shardid = :new_shard_id;
-- Test copy into range-partitioned table -- Test copy into range-partitioned table
COPY customer_copy_range FROM '@abs_srcdir@/data/customer.1.data' WITH (DELIMITER '|'); COPY customer_copy_range FROM '@abs_srcdir@/data/customer.1.data' WITH (DELIMITER '|');
-- Check whether data went into the right shard (maybe) -- Check whether data went into the right shard (maybe)
SELECT count(*) FROM customer_copy_range WHERE c_custkey = 1; SELECT min(c_custkey), max(c_custkey), avg(c_custkey), count(*)
count FROM customer_copy_range WHERE c_custkey <= 500;
------- min | max | avg | count
1 -----+-----+----------------------+-------
1 | 500 | 250.5000000000000000 | 500
(1 row) (1 row)
-- Check whether data was copied -- Check whether data was copied