Improve COPY shard-pruning test

pull/366/head
Marco Slot 2016-03-01 00:31:24 +01:00 committed by Metin Doslu
parent 83c83fdf1a
commit 2a8121ca5f
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 '|');
-- 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
SELECT count(*) FROM customer_copy_range;

View File

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