Lowercase \copy to match PostgreSQL's style for local/psql-level functions

pull/630/head
Eren Başak 2016-08-11 11:51:53 +03:00 committed by Jason Petersen
parent b513f1c911
commit 0322916700
No known key found for this signature in database
GPG Key ID: 9F1D3510D110ABA9
33 changed files with 123 additions and 123 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
echo "WARNING: copy_to_distributed_table is now deprecated." >&2 echo "WARNING: copy_to_distributed_table is now deprecated." >&2
echo "HINT: You can use \\COPY on distributed tables, which is a lot faster." >&2 echo "HINT: You can use \\copy on distributed tables, which is a lot faster." >&2
# make bash behave # make bash behave
set -euo pipefail set -euo pipefail

View File

@ -123,7 +123,7 @@ SELECT master_create_worker_shards('test_count_distinct_schema.nation_hash', 4,
(1 row) (1 row)
\COPY test_count_distinct_schema.nation_hash FROM STDIN with delimiter '|'; \copy test_count_distinct_schema.nation_hash FROM STDIN with delimiter '|';
SET search_path TO public; SET search_path TO public;
SET citus.count_distinct_error_rate TO 0.01; SET citus.count_distinct_error_rate TO 0.01;
SELECT COUNT (DISTINCT n_regionkey) FROM test_count_distinct_schema.nation_hash; SELECT COUNT (DISTINCT n_regionkey) FROM test_count_distinct_schema.nation_hash;

View File

@ -13,7 +13,7 @@ CREATE TABLE public.nation_local(
n_regionkey integer not null, n_regionkey integer not null,
n_comment varchar(152) n_comment varchar(152)
); );
\COPY public.nation_local FROM STDIN with delimiter '|'; \copy public.nation_local FROM STDIN with delimiter '|';
CREATE TABLE test_schema_support.nation_append( CREATE TABLE test_schema_support.nation_append(
n_nationkey integer not null, n_nationkey integer not null,
n_name char(25) not null, n_name char(25) not null,
@ -122,7 +122,7 @@ SELECT master_create_distributed_table('nation_append_search_path', 'n_nationkey
(1 row) (1 row)
\COPY nation_append_search_path FROM STDIN with delimiter '|'; \copy nation_append_search_path FROM STDIN with delimiter '|';
-- create shard with master_create_worker_shards -- create shard with master_create_worker_shards
CREATE TABLE test_schema_support.nation_hash( CREATE TABLE test_schema_support.nation_hash(
n_nationkey integer not null, n_nationkey integer not null,
@ -192,7 +192,7 @@ SELECT * FROM nation_hash WHERE n_nationkey = 7;
-- test UDFs with schemas -- test UDFs with schemas
SET search_path TO public; SET search_path TO public;
\COPY test_schema_support.nation_hash FROM STDIN with delimiter '|'; \copy test_schema_support.nation_hash FROM STDIN with delimiter '|';
-- create UDF in master node -- create UDF in master node
CREATE OR REPLACE FUNCTION dummyFunction(theValue integer) CREATE OR REPLACE FUNCTION dummyFunction(theValue integer)
RETURNS text AS RETURNS text AS
@ -446,7 +446,7 @@ SELECT master_create_worker_shards('test_schema_support.nation_hash_collation',
(1 row) (1 row)
\COPY test_schema_support.nation_hash_collation FROM STDIN with delimiter '|'; \copy test_schema_support.nation_hash_collation FROM STDIN with delimiter '|';
SELECT * FROM test_schema_support.nation_hash_collation; SELECT * FROM test_schema_support.nation_hash_collation;
n_nationkey | n_name | n_regionkey | n_comment n_nationkey | n_name | n_regionkey | n_comment
-------------+---------------------------+-------------+------------------------------------------------------------------------------------------------------------- -------------+---------------------------+-------------+-------------------------------------------------------------------------------------------------------------
@ -489,7 +489,7 @@ SELECT master_create_worker_shards('nation_hash_collation_search_path', 4, 2);
(1 row) (1 row)
\COPY nation_hash_collation_search_path FROM STDIN with delimiter '|'; \copy nation_hash_collation_search_path FROM STDIN with delimiter '|';
SELECT * FROM nation_hash_collation_search_path; SELECT * FROM nation_hash_collation_search_path;
n_nationkey | n_name | n_regionkey | n_comment n_nationkey | n_name | n_regionkey | n_comment
-------------+---------------------------+-------------+------------------------------------------------------------------------------------------------------------- -------------+---------------------------+-------------+-------------------------------------------------------------------------------------------------------------
@ -542,7 +542,7 @@ SELECT master_create_worker_shards('test_schema_support.nation_hash_composite_ty
(1 row) (1 row)
-- insert some data to verify composite type queries -- insert some data to verify composite type queries
\COPY test_schema_support.nation_hash_composite_types FROM STDIN with delimiter '|'; \copy test_schema_support.nation_hash_composite_types FROM STDIN with delimiter '|';
SELECT * FROM test_schema_support.nation_hash_composite_types WHERE test_col = '(a,a)'::test_schema_support.new_composite_type; SELECT * FROM test_schema_support.nation_hash_composite_types WHERE test_col = '(a,a)'::test_schema_support.new_composite_type;
n_nationkey | n_name | n_regionkey | n_comment | test_col n_nationkey | n_name | n_regionkey | n_comment | test_col
-------------+---------------------------+-------------+----------------------------------------------------+---------- -------------+---------------------------+-------------+----------------------------------------------------+----------
@ -829,7 +829,7 @@ SELECT master_apply_delete_command('DELETE FROM test_schema_support.nation_appen
\c - - - :master_port \c - - - :master_port
-- test with search_path is set -- test with search_path is set
SET search_path TO test_schema_support; SET search_path TO test_schema_support;
\COPY nation_append FROM STDIN with delimiter '|'; \copy nation_append FROM STDIN with delimiter '|';
SELECT master_apply_delete_command('DELETE FROM nation_append') ; SELECT master_apply_delete_command('DELETE FROM nation_append') ;
master_apply_delete_command master_apply_delete_command
----------------------------- -----------------------------
@ -873,7 +873,7 @@ SELECT master_create_worker_shards('test_schema_support_join_1.nation_hash', 4,
(1 row) (1 row)
\COPY test_schema_support_join_1.nation_hash FROM STDIN with delimiter '|'; \copy test_schema_support_join_1.nation_hash FROM STDIN with delimiter '|';
SELECT master_create_distributed_table('test_schema_support_join_1.nation_hash_2', 'n_nationkey', 'hash'); SELECT master_create_distributed_table('test_schema_support_join_1.nation_hash_2', 'n_nationkey', 'hash');
master_create_distributed_table master_create_distributed_table
--------------------------------- ---------------------------------
@ -886,7 +886,7 @@ SELECT master_create_worker_shards('test_schema_support_join_1.nation_hash_2', 4
(1 row) (1 row)
\COPY test_schema_support_join_1.nation_hash_2 FROM STDIN with delimiter '|'; \copy test_schema_support_join_1.nation_hash_2 FROM STDIN with delimiter '|';
SELECT master_create_distributed_table('test_schema_support_join_2.nation_hash', 'n_nationkey', 'hash'); SELECT master_create_distributed_table('test_schema_support_join_2.nation_hash', 'n_nationkey', 'hash');
master_create_distributed_table master_create_distributed_table
--------------------------------- ---------------------------------
@ -899,7 +899,7 @@ SELECT master_create_worker_shards('test_schema_support_join_2.nation_hash', 4,
(1 row) (1 row)
\COPY test_schema_support_join_2.nation_hash FROM STDIN with delimiter '|'; \copy test_schema_support_join_2.nation_hash FROM STDIN with delimiter '|';
-- check when search_path is public, -- check when search_path is public,
-- join of two tables which are in different schemas, -- join of two tables which are in different schemas,
-- join on partition column -- join on partition column

View File

@ -38,8 +38,8 @@ UPDATE pg_dist_shard SET shardminvalue = 8997, shardmaxvalue = 14947
WHERE shardid = :new_shard_id; WHERE shardid = :new_shard_id;
SET citus.shard_max_size TO "500MB"; SET citus.shard_max_size TO "500MB";
\COPY lineitem_range FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|' \copy lineitem_range FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
\COPY lineitem_range FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|' \copy lineitem_range FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|'
RESET citus.shard_max_size; RESET citus.shard_max_size;
-- Run aggregate(distinct) on partition column for range partitioned table -- Run aggregate(distinct) on partition column for range partitioned table
@ -99,8 +99,8 @@ CREATE TABLE lineitem_hash (
SELECT master_create_distributed_table('lineitem_hash', 'l_orderkey', 'hash'); SELECT master_create_distributed_table('lineitem_hash', 'l_orderkey', 'hash');
SELECT master_create_worker_shards('lineitem_hash', 4, 1); SELECT master_create_worker_shards('lineitem_hash', 4, 1);
\COPY lineitem_hash FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|' \copy lineitem_hash FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
\COPY lineitem_hash FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|' \copy lineitem_hash FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|'
-- aggregate(distinct) on partition column is allowed -- aggregate(distinct) on partition column is allowed

View File

@ -24,7 +24,7 @@ CREATE TABLE aggregate_type (
interval_value interval not null); interval_value interval not null);
SELECT master_create_distributed_table('aggregate_type', 'float_value', 'append'); SELECT master_create_distributed_table('aggregate_type', 'float_value', 'append');
\COPY aggregate_type FROM '@abs_srcdir@/data/agg_type.data' \copy aggregate_type FROM '@abs_srcdir@/data/agg_type.data'
-- Test conversions using aggregates on floats and division -- Test conversions using aggregates on floats and division

View File

@ -29,7 +29,7 @@ CREATE TABLE lineitem_alter (
l_comment varchar(44) not null l_comment varchar(44) not null
); );
SELECT master_create_distributed_table('lineitem_alter', 'l_orderkey', 'append'); SELECT master_create_distributed_table('lineitem_alter', 'l_orderkey', 'append');
\COPY lineitem_alter FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|' \copy lineitem_alter FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
-- Verify that we can add columns -- Verify that we can add columns
@ -57,8 +57,8 @@ SELECT int_column1, count(*) FROM lineitem_alter GROUP BY int_column1;
ALTER TABLE lineitem_alter ALTER COLUMN float_column SET DEFAULT 1; ALTER TABLE lineitem_alter ALTER COLUMN float_column SET DEFAULT 1;
ALTER TABLE lineitem_alter ALTER COLUMN int_column1 DROP DEFAULT; ALTER TABLE lineitem_alter ALTER COLUMN int_column1 DROP DEFAULT;
-- \COPY to verify that default values take effect -- \copy to verify that default values take effect
\COPY lineitem_alter (l_orderkey, l_partkey, l_suppkey, l_linenumber, l_quantity, l_extendedprice, l_discount, l_tax, l_returnflag, l_linestatus, l_shipdate, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_comment) FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|' \copy lineitem_alter (l_orderkey, l_partkey, l_suppkey, l_linenumber, l_quantity, l_extendedprice, l_discount, l_tax, l_returnflag, l_linestatus, l_shipdate, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_comment) FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
SELECT float_column, count(*) FROM lineitem_alter GROUP BY float_column; SELECT float_column, count(*) FROM lineitem_alter GROUP BY float_column;
SELECT int_column1, count(*) FROM lineitem_alter GROUP BY int_column1; SELECT int_column1, count(*) FROM lineitem_alter GROUP BY int_column1;
@ -71,17 +71,17 @@ ALTER TABLE lineitem_alter ALTER COLUMN int_column2 SET NOT NULL;
-- Drop default so that NULLs will be inserted for this column -- Drop default so that NULLs will be inserted for this column
ALTER TABLE lineitem_alter ALTER COLUMN int_column2 DROP DEFAULT; ALTER TABLE lineitem_alter ALTER COLUMN int_column2 DROP DEFAULT;
-- \COPY should fail because it will try to insert NULLs for a NOT NULL column -- \copy should fail because it will try to insert NULLs for a NOT NULL column
-- Note, this operation will create a table on the workers but it won't be in the metadata -- Note, this operation will create a table on the workers but it won't be in the metadata
\COPY lineitem_alter (l_orderkey, l_partkey, l_suppkey, l_linenumber, l_quantity, l_extendedprice, l_discount, l_tax, l_returnflag, l_linestatus, l_shipdate, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_comment) FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|' \copy lineitem_alter (l_orderkey, l_partkey, l_suppkey, l_linenumber, l_quantity, l_extendedprice, l_discount, l_tax, l_returnflag, l_linestatus, l_shipdate, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_comment) FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
-- Verify that DROP NOT NULL works -- Verify that DROP NOT NULL works
ALTER TABLE lineitem_alter ALTER COLUMN int_column2 DROP NOT NULL; ALTER TABLE lineitem_alter ALTER COLUMN int_column2 DROP NOT NULL;
\d lineitem_alter \d lineitem_alter
-- \COPY should succeed now -- \copy should succeed now
\COPY lineitem_alter (l_orderkey, l_partkey, l_suppkey, l_linenumber, l_quantity, l_extendedprice, l_discount, l_tax, l_returnflag, l_linestatus, l_shipdate, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_comment) FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|' \copy lineitem_alter (l_orderkey, l_partkey, l_suppkey, l_linenumber, l_quantity, l_extendedprice, l_discount, l_tax, l_returnflag, l_linestatus, l_shipdate, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_comment) FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
SELECT count(*) from lineitem_alter; SELECT count(*) from lineitem_alter;
-- Verify that SET DATA TYPE works -- Verify that SET DATA TYPE works

View File

@ -32,12 +32,12 @@ SELECT master_create_worker_shards('multi_append_table_to_shard_right_hash', 1,
-- Replicate 'left' table on both workers -- Replicate 'left' table on both workers
SELECT set_config('citus.shard_replication_factor', '2', false); SELECT set_config('citus.shard_replication_factor', '2', false);
\COPY multi_append_table_to_shard_left FROM '@abs_srcdir@/data/agg.data' \copy multi_append_table_to_shard_left FROM '@abs_srcdir@/data/agg.data'
\COPY multi_append_table_to_shard_left FROM '@abs_srcdir@/data/agg.data' \copy multi_append_table_to_shard_left FROM '@abs_srcdir@/data/agg.data'
-- Place 'right' table only on the primary worker -- Place 'right' table only on the primary worker
SELECT set_config('citus.shard_replication_factor', '1', false); SELECT set_config('citus.shard_replication_factor', '1', false);
\COPY multi_append_table_to_shard_right FROM '@abs_srcdir@/data/agg.data' \copy multi_append_table_to_shard_right FROM '@abs_srcdir@/data/agg.data'
-- Reset shard replication factor to ensure tasks will be assigned to both workers -- Reset shard replication factor to ensure tasks will be assigned to both workers
SELECT set_config('citus.shard_replication_factor', '2', false); SELECT set_config('citus.shard_replication_factor', '2', false);

View File

@ -29,8 +29,8 @@ CREATE TABLE lineitem_hash (
SELECT master_create_distributed_table('lineitem_hash', 'l_orderkey', 'hash'); SELECT master_create_distributed_table('lineitem_hash', 'l_orderkey', 'hash');
SELECT master_create_worker_shards('lineitem_hash', 8, 1); SELECT master_create_worker_shards('lineitem_hash', 8, 1);
\COPY lineitem_hash FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|' \copy lineitem_hash FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
\COPY lineitem_hash FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|' \copy lineitem_hash FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|'
SET citus.task_executor_type to "task-tracker"; SET citus.task_executor_type to "task-tracker";

View File

@ -105,7 +105,7 @@ COPY customer_copy_hash FROM '@abs_srcdir@/data/customer.2.data' WITH (DELIMITER
SELECT count(*) FROM customer_copy_hash; SELECT count(*) FROM customer_copy_hash;
-- Test client-side copy from file -- Test client-side copy from file
\COPY customer_copy_hash FROM '@abs_srcdir@/data/customer.3.data' WITH (DELIMITER '|'); \copy customer_copy_hash FROM '@abs_srcdir@/data/customer.3.data' WITH (DELIMITER '|');
-- Confirm that data was copied -- Confirm that data was copied
SELECT count(*) FROM customer_copy_hash; SELECT count(*) FROM customer_copy_hash;

View File

@ -11,6 +11,6 @@ CREATE TABLE nation (
n_comment varchar(152)); n_comment varchar(152));
SELECT master_create_distributed_table('tpch.nation', 'n_nationkey', 'append'); SELECT master_create_distributed_table('tpch.nation', 'n_nationkey', 'append');
\COPY tpch.nation FROM '@abs_srcdir@/data/nation.data' with delimiter '|' \copy tpch.nation FROM '@abs_srcdir@/data/nation.data' with delimiter '|'
SELECT count(*) from tpch.nation; SELECT count(*) from tpch.nation;

View File

@ -13,8 +13,8 @@ ALTER SEQUENCE pg_catalog.pg_dist_jobid_seq RESTART 9000000;
-- Stage additional data to start using large shard identifiers. -- Stage additional data to start using large shard identifiers.
\COPY lineitem FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|' \copy lineitem FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
\COPY lineitem FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|' \copy lineitem FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|'
-- Query #1 from the TPC-H decision support benchmark. -- Query #1 from the TPC-H decision support benchmark.

View File

@ -19,9 +19,9 @@ CREATE TABLE customer_delete_protocol (
c_comment varchar(117) not null); c_comment varchar(117) not null);
SELECT master_create_distributed_table('customer_delete_protocol', 'c_custkey', 'append'); SELECT master_create_distributed_table('customer_delete_protocol', 'c_custkey', 'append');
\COPY customer_delete_protocol FROM '@abs_srcdir@/data/customer.1.data' with delimiter '|' \copy customer_delete_protocol FROM '@abs_srcdir@/data/customer.1.data' with delimiter '|'
\COPY customer_delete_protocol FROM '@abs_srcdir@/data/customer.2.data' with delimiter '|' \copy customer_delete_protocol FROM '@abs_srcdir@/data/customer.2.data' with delimiter '|'
\COPY customer_delete_protocol FROM '@abs_srcdir@/data/customer.3.data' with delimiter '|' \copy customer_delete_protocol FROM '@abs_srcdir@/data/customer.3.data' with delimiter '|'
-- Testing master_apply_delete_command -- Testing master_apply_delete_command
-- Check that we don't support conditions on columns other than partition key. -- Check that we don't support conditions on columns other than partition key.

View File

@ -53,11 +53,11 @@ FROM
multi_outer_join_left a LEFT JOIN multi_outer_join_third b ON (l_custkey = t_custkey); multi_outer_join_left a LEFT JOIN multi_outer_join_third b ON (l_custkey = t_custkey);
-- Left table is a large table -- Left table is a large table
\COPY multi_outer_join_left FROM '@abs_srcdir@/data/customer-1-10.data' with delimiter '|' \copy multi_outer_join_left FROM '@abs_srcdir@/data/customer-1-10.data' with delimiter '|'
\COPY multi_outer_join_left FROM '@abs_srcdir@/data/customer-11-20.data' with delimiter '|' \copy multi_outer_join_left FROM '@abs_srcdir@/data/customer-11-20.data' with delimiter '|'
-- Right table is a small table -- Right table is a small table
\COPY multi_outer_join_right FROM '@abs_srcdir@/data/customer-1-15.data' with delimiter '|' \copy multi_outer_join_right FROM '@abs_srcdir@/data/customer-1-15.data' with delimiter '|'
-- Make sure we do not crash if one table has no shards -- Make sure we do not crash if one table has no shards
SELECT SELECT
@ -71,7 +71,7 @@ FROM
multi_outer_join_third a LEFT JOIN multi_outer_join_right b ON (r_custkey = t_custkey); multi_outer_join_third a LEFT JOIN multi_outer_join_right b ON (r_custkey = t_custkey);
-- Third table is a single shard table with all data -- Third table is a single shard table with all data
\COPY multi_outer_join_third FROM '@abs_srcdir@/data/customer-1-30.data' with delimiter '|' \copy multi_outer_join_third FROM '@abs_srcdir@/data/customer-1-30.data' with delimiter '|'
-- Regular outer join should return results for all rows -- Regular outer join should return results for all rows
SELECT SELECT
@ -150,7 +150,7 @@ FROM
-- Turn the right table into a large table -- Turn the right table into a large table
\COPY multi_outer_join_right FROM '@abs_srcdir@/data/customer-21-30.data' with delimiter '|' \copy multi_outer_join_right FROM '@abs_srcdir@/data/customer-21-30.data' with delimiter '|'
-- Shards do not have 1-1 matching. We should error here. -- Shards do not have 1-1 matching. We should error here.
@ -164,11 +164,11 @@ SELECT * FROM master_apply_delete_command('DELETE FROM multi_outer_join_left');
SELECT * FROM master_apply_delete_command('DELETE FROM multi_outer_join_right'); SELECT * FROM master_apply_delete_command('DELETE FROM multi_outer_join_right');
-- reload shards with 1-1 matching -- reload shards with 1-1 matching
\COPY multi_outer_join_left FROM '@abs_srcdir@/data/customer-1-15.data' with delimiter '|' \copy multi_outer_join_left FROM '@abs_srcdir@/data/customer-1-15.data' with delimiter '|'
\COPY multi_outer_join_left FROM '@abs_srcdir@/data/customer-21-30.data' with delimiter '|' \copy multi_outer_join_left FROM '@abs_srcdir@/data/customer-21-30.data' with delimiter '|'
\COPY multi_outer_join_right FROM '@abs_srcdir@/data/customer-11-20.data' with delimiter '|' \copy multi_outer_join_right FROM '@abs_srcdir@/data/customer-11-20.data' with delimiter '|'
\COPY multi_outer_join_right FROM '@abs_srcdir@/data/customer-21-30.data' with delimiter '|' \copy multi_outer_join_right FROM '@abs_srcdir@/data/customer-21-30.data' with delimiter '|'
-- multi_outer_join_third is a single shard table -- multi_outer_join_third is a single shard table
@ -409,7 +409,7 @@ ORDER BY cnt DESC, l1.l_custkey DESC
LIMIT 20; LIMIT 20;
-- Add a shard to the left table that overlaps with multiple shards in the right -- Add a shard to the left table that overlaps with multiple shards in the right
\COPY multi_outer_join_left FROM '@abs_srcdir@/data/customer.1.data' with delimiter '|' \copy multi_outer_join_left FROM '@abs_srcdir@/data/customer.1.data' with delimiter '|'
-- All outer joins should error out -- All outer joins should error out

View File

@ -9,13 +9,13 @@
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 290000; ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 290000;
ALTER SEQUENCE pg_catalog.pg_dist_jobid_seq RESTART 290000; ALTER SEQUENCE pg_catalog.pg_dist_jobid_seq RESTART 290000;
\COPY lineitem FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|' \copy lineitem FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
\COPY lineitem FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|' \copy lineitem FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|'
\COPY orders FROM '@abs_srcdir@/data/orders.1.data' with delimiter '|' \copy orders FROM '@abs_srcdir@/data/orders.1.data' with delimiter '|'
\COPY orders FROM '@abs_srcdir@/data/orders.2.data' with delimiter '|' \copy orders FROM '@abs_srcdir@/data/orders.2.data' with delimiter '|'
\COPY customer FROM '@abs_srcdir@/data/customer.1.data' with delimiter '|' \copy customer FROM '@abs_srcdir@/data/customer.1.data' with delimiter '|'
\COPY nation FROM '@abs_srcdir@/data/nation.data' with delimiter '|' \copy nation FROM '@abs_srcdir@/data/nation.data' with delimiter '|'
\COPY part FROM '@abs_srcdir@/data/part.data' with delimiter '|' \copy part FROM '@abs_srcdir@/data/part.data' with delimiter '|'
\COPY supplier FROM '@abs_srcdir@/data/supplier.data' with delimiter '|' \copy supplier FROM '@abs_srcdir@/data/supplier.data' with delimiter '|'

View File

@ -15,7 +15,7 @@ SET citus.shard_max_size TO "256kB";
CREATE TABLE large_records_table (data_id integer, data text); CREATE TABLE large_records_table (data_id integer, data text);
SELECT master_create_distributed_table('large_records_table', 'data_id', 'append'); SELECT master_create_distributed_table('large_records_table', 'data_id', 'append');
\COPY large_records_table FROM '@abs_srcdir@/data/large_records.data' with delimiter '|' \copy large_records_table FROM '@abs_srcdir@/data/large_records.data' with delimiter '|'
SELECT shardminvalue, shardmaxvalue FROM pg_dist_shard, pg_class SELECT shardminvalue, shardmaxvalue FROM pg_dist_shard, pg_class
WHERE pg_class.oid=logicalrelid AND relname='large_records_table' WHERE pg_class.oid=logicalrelid AND relname='large_records_table'

View File

@ -11,6 +11,6 @@ ALTER SEQUENCE pg_catalog.pg_dist_jobid_seq RESTART 280000;
-- staging causes the planner to consider customer and part tables as large, and -- staging causes the planner to consider customer and part tables as large, and
-- evaluate plans where some of the underlying tables need to be repartitioned. -- evaluate plans where some of the underlying tables need to be repartitioned.
\COPY customer FROM '@abs_srcdir@/data/customer.2.data' with delimiter '|' \copy customer FROM '@abs_srcdir@/data/customer.2.data' with delimiter '|'
\COPY customer FROM '@abs_srcdir@/data/customer.3.data' with delimiter '|' \copy customer FROM '@abs_srcdir@/data/customer.3.data' with delimiter '|'
\COPY part FROM '@abs_srcdir@/data/part.more.data' with delimiter '|' \copy part FROM '@abs_srcdir@/data/part.more.data' with delimiter '|'

View File

@ -101,11 +101,11 @@ WHERE shardid = :new_shard_id;
SET citus.shard_max_size TO "1MB"; SET citus.shard_max_size TO "1MB";
\COPY lineitem_subquery FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|' \copy lineitem_subquery FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
\COPY lineitem_subquery FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|' \copy lineitem_subquery FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|'
\COPY orders_subquery FROM '@abs_srcdir@/data/orders.1.data' with delimiter '|' \copy orders_subquery FROM '@abs_srcdir@/data/orders.1.data' with delimiter '|'
\COPY orders_subquery FROM '@abs_srcdir@/data/orders.2.data' with delimiter '|' \copy orders_subquery FROM '@abs_srcdir@/data/orders.2.data' with delimiter '|'
-- Check that we error out if shard min/max values are not exactly same. -- Check that we error out if shard min/max values are not exactly same.

View File

@ -36,8 +36,8 @@ SELECT master_create_empty_shard('lineitem_range') AS new_shard_id
UPDATE pg_dist_shard SET shardminvalue = 8997, shardmaxvalue = 14947 UPDATE pg_dist_shard SET shardminvalue = 8997, shardmaxvalue = 14947
WHERE shardid = :new_shard_id; WHERE shardid = :new_shard_id;
SET citus.shard_max_size TO "500MB"; SET citus.shard_max_size TO "500MB";
\COPY lineitem_range FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|' \copy lineitem_range FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
\COPY lineitem_range FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|' \copy lineitem_range FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|'
RESET citus.shard_max_size; RESET citus.shard_max_size;
-- Run aggregate(distinct) on partition column for range partitioned table -- Run aggregate(distinct) on partition column for range partitioned table
SELECT count(distinct l_orderkey) FROM lineitem_range; SELECT count(distinct l_orderkey) FROM lineitem_range;
@ -139,8 +139,8 @@ SELECT master_create_worker_shards('lineitem_hash', 4, 1);
(1 row) (1 row)
\COPY lineitem_hash FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|' \copy lineitem_hash FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
\COPY lineitem_hash FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|' \copy lineitem_hash FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|'
-- aggregate(distinct) on partition column is allowed -- aggregate(distinct) on partition column is allowed
SELECT count(distinct l_orderkey) FROM lineitem_hash; SELECT count(distinct l_orderkey) FROM lineitem_hash;
count count

View File

@ -41,7 +41,7 @@ SELECT master_create_distributed_table('aggregate_type', 'float_value', 'append'
(1 row) (1 row)
\COPY aggregate_type FROM '@abs_srcdir@/data/agg_type.data' \copy aggregate_type FROM '@abs_srcdir@/data/agg_type.data'
-- Test conversions using aggregates on floats and division -- Test conversions using aggregates on floats and division
SELECT min(float_value), max(float_value), SELECT min(float_value), max(float_value),
sum(float_value), count(float_value), avg(float_value) sum(float_value), count(float_value), avg(float_value)

View File

@ -30,7 +30,7 @@ SELECT master_create_distributed_table('lineitem_alter', 'l_orderkey', 'append')
(1 row) (1 row)
\COPY lineitem_alter FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|' \copy lineitem_alter FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
-- Verify that we can add columns -- Verify that we can add columns
ALTER TABLE lineitem_alter ADD COLUMN float_column FLOAT; ALTER TABLE lineitem_alter ADD COLUMN float_column FLOAT;
NOTICE: using one-phase commit for distributed DDL commands NOTICE: using one-phase commit for distributed DDL commands
@ -121,8 +121,8 @@ ALTER TABLE lineitem_alter ALTER COLUMN float_column SET DEFAULT 1;
NOTICE: using one-phase commit for distributed DDL commands NOTICE: using one-phase commit for distributed DDL commands
HINT: You can enable two-phase commit for extra safety with: SET citus.multi_shard_commit_protocol TO '2pc' HINT: You can enable two-phase commit for extra safety with: SET citus.multi_shard_commit_protocol TO '2pc'
ALTER TABLE lineitem_alter ALTER COLUMN int_column1 DROP DEFAULT; ALTER TABLE lineitem_alter ALTER COLUMN int_column1 DROP DEFAULT;
-- \COPY to verify that default values take effect -- \copy to verify that default values take effect
\COPY lineitem_alter (l_orderkey, l_partkey, l_suppkey, l_linenumber, l_quantity, l_extendedprice, l_discount, l_tax, l_returnflag, l_linestatus, l_shipdate, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_comment) FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|' \copy lineitem_alter (l_orderkey, l_partkey, l_suppkey, l_linenumber, l_quantity, l_extendedprice, l_discount, l_tax, l_returnflag, l_linestatus, l_shipdate, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_comment) FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
SELECT float_column, count(*) FROM lineitem_alter GROUP BY float_column; SELECT float_column, count(*) FROM lineitem_alter GROUP BY float_column;
float_column | count float_column | count
--------------+------- --------------+-------
@ -167,9 +167,9 @@ ALTER TABLE lineitem_alter ALTER COLUMN int_column2 SET NOT NULL;
-- Drop default so that NULLs will be inserted for this column -- Drop default so that NULLs will be inserted for this column
ALTER TABLE lineitem_alter ALTER COLUMN int_column2 DROP DEFAULT; ALTER TABLE lineitem_alter ALTER COLUMN int_column2 DROP DEFAULT;
-- \COPY should fail because it will try to insert NULLs for a NOT NULL column -- \copy should fail because it will try to insert NULLs for a NOT NULL column
-- Note, this operation will create a table on the workers but it won't be in the metadata -- Note, this operation will create a table on the workers but it won't be in the metadata
\COPY lineitem_alter (l_orderkey, l_partkey, l_suppkey, l_linenumber, l_quantity, l_extendedprice, l_discount, l_tax, l_returnflag, l_linestatus, l_shipdate, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_comment) FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|' \copy lineitem_alter (l_orderkey, l_partkey, l_suppkey, l_linenumber, l_quantity, l_extendedprice, l_discount, l_tax, l_returnflag, l_linestatus, l_shipdate, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_comment) FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
ERROR: null value in column "int_column2" violates not-null constraint ERROR: null value in column "int_column2" violates not-null constraint
DETAIL: Failing row contains (1, 155190, 7706, 1, 17.00, 21168.23, 0.04, 0.02, N, O, 1996-03-13, 1996-02-12, 1996-03-22, DELIVER IN PERSON , TRUCK , egular courts above the, 1, null, null, null, null). DETAIL: Failing row contains (1, 155190, 7706, 1, 17.00, 21168.23, 0.04, 0.02, N, O, 1996-03-13, 1996-02-12, 1996-03-22, DELIVER IN PERSON , TRUCK , egular courts above the, 1, null, null, null, null).
-- Verify that DROP NOT NULL works -- Verify that DROP NOT NULL works
@ -200,8 +200,8 @@ ALTER TABLE lineitem_alter ALTER COLUMN int_column2 DROP NOT NULL;
int_column2 | integer | int_column2 | integer |
null_column | integer | null_column | integer |
-- \COPY should succeed now -- \copy should succeed now
\COPY lineitem_alter (l_orderkey, l_partkey, l_suppkey, l_linenumber, l_quantity, l_extendedprice, l_discount, l_tax, l_returnflag, l_linestatus, l_shipdate, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_comment) FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|' \copy lineitem_alter (l_orderkey, l_partkey, l_suppkey, l_linenumber, l_quantity, l_extendedprice, l_discount, l_tax, l_returnflag, l_linestatus, l_shipdate, l_commitdate, l_receiptdate, l_shipinstruct, l_shipmode, l_comment) FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
SELECT count(*) from lineitem_alter; SELECT count(*) from lineitem_alter;
count count
------- -------

View File

@ -50,8 +50,8 @@ SELECT set_config('citus.shard_replication_factor', '2', false);
2 2
(1 row) (1 row)
\COPY multi_append_table_to_shard_left FROM '@abs_srcdir@/data/agg.data' \copy multi_append_table_to_shard_left FROM '@abs_srcdir@/data/agg.data'
\COPY multi_append_table_to_shard_left FROM '@abs_srcdir@/data/agg.data' \copy multi_append_table_to_shard_left FROM '@abs_srcdir@/data/agg.data'
-- Place 'right' table only on the primary worker -- Place 'right' table only on the primary worker
SELECT set_config('citus.shard_replication_factor', '1', false); SELECT set_config('citus.shard_replication_factor', '1', false);
set_config set_config
@ -59,7 +59,7 @@ SELECT set_config('citus.shard_replication_factor', '1', false);
1 1
(1 row) (1 row)
\COPY multi_append_table_to_shard_right FROM '@abs_srcdir@/data/agg.data' \copy multi_append_table_to_shard_right FROM '@abs_srcdir@/data/agg.data'
-- Reset shard replication factor to ensure tasks will be assigned to both workers -- Reset shard replication factor to ensure tasks will be assigned to both workers
SELECT set_config('citus.shard_replication_factor', '2', false); SELECT set_config('citus.shard_replication_factor', '2', false);
set_config set_config

View File

@ -34,8 +34,8 @@ SELECT master_create_worker_shards('lineitem_hash', 8, 1);
(1 row) (1 row)
\COPY lineitem_hash FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|' \copy lineitem_hash FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
\COPY lineitem_hash FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|' \copy lineitem_hash FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|'
SET citus.task_executor_type to "task-tracker"; SET citus.task_executor_type to "task-tracker";
-- count(distinct) is supported on top level query if there -- count(distinct) is supported on top level query if there
-- is a grouping on the partition key -- is a grouping on the partition key

View File

@ -118,7 +118,7 @@ SELECT count(*) FROM customer_copy_hash;
(1 row) (1 row)
-- Test client-side copy from file -- Test client-side copy from file
\COPY customer_copy_hash FROM '@abs_srcdir@/data/customer.3.data' WITH (DELIMITER '|'); \copy customer_copy_hash FROM '@abs_srcdir@/data/customer.3.data' WITH (DELIMITER '|');
-- Confirm that data was copied -- Confirm that data was copied
SELECT count(*) FROM customer_copy_hash; SELECT count(*) FROM customer_copy_hash;
count count

View File

@ -12,7 +12,7 @@ SELECT master_create_distributed_table('tpch.nation', 'n_nationkey', 'append');
(1 row) (1 row)
\COPY tpch.nation FROM '@abs_srcdir@/data/nation.data' with delimiter '|' \copy tpch.nation FROM '@abs_srcdir@/data/nation.data' with delimiter '|'
SELECT count(*) from tpch.nation; SELECT count(*) from tpch.nation;
count count
------- -------

View File

@ -7,8 +7,8 @@
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 100200300400500; ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 100200300400500;
ALTER SEQUENCE pg_catalog.pg_dist_jobid_seq RESTART 9000000; ALTER SEQUENCE pg_catalog.pg_dist_jobid_seq RESTART 9000000;
-- Stage additional data to start using large shard identifiers. -- Stage additional data to start using large shard identifiers.
\COPY lineitem FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|' \copy lineitem FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
\COPY lineitem FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|' \copy lineitem FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|'
-- Query #1 from the TPC-H decision support benchmark. -- Query #1 from the TPC-H decision support benchmark.
SELECT SELECT
l_returnflag, l_returnflag,

View File

@ -19,9 +19,9 @@ SELECT master_create_distributed_table('customer_delete_protocol', 'c_custkey',
(1 row) (1 row)
\COPY customer_delete_protocol FROM '@abs_srcdir@/data/customer.1.data' with delimiter '|' \copy customer_delete_protocol FROM '@abs_srcdir@/data/customer.1.data' with delimiter '|'
\COPY customer_delete_protocol FROM '@abs_srcdir@/data/customer.2.data' with delimiter '|' \copy customer_delete_protocol FROM '@abs_srcdir@/data/customer.2.data' with delimiter '|'
\COPY customer_delete_protocol FROM '@abs_srcdir@/data/customer.3.data' with delimiter '|' \copy customer_delete_protocol FROM '@abs_srcdir@/data/customer.3.data' with delimiter '|'
-- Testing master_apply_delete_command -- Testing master_apply_delete_command
-- Check that we don't support conditions on columns other than partition key. -- Check that we don't support conditions on columns other than partition key.
SELECT master_apply_delete_command('DELETE FROM customer_delete_protocol SELECT master_apply_delete_command('DELETE FROM customer_delete_protocol

View File

@ -62,10 +62,10 @@ FROM
ERROR: cannot perform distributed planning on this query ERROR: cannot perform distributed planning on this query
DETAIL: Shards of relations in outer join queries must have 1-to-1 shard partitioning DETAIL: Shards of relations in outer join queries must have 1-to-1 shard partitioning
-- Left table is a large table -- Left table is a large table
\COPY multi_outer_join_left FROM '@abs_srcdir@/data/customer-1-10.data' with delimiter '|' \copy multi_outer_join_left FROM '@abs_srcdir@/data/customer-1-10.data' with delimiter '|'
\COPY multi_outer_join_left FROM '@abs_srcdir@/data/customer-11-20.data' with delimiter '|' \copy multi_outer_join_left FROM '@abs_srcdir@/data/customer-11-20.data' with delimiter '|'
-- Right table is a small table -- Right table is a small table
\COPY multi_outer_join_right FROM '@abs_srcdir@/data/customer-1-15.data' with delimiter '|' \copy multi_outer_join_right FROM '@abs_srcdir@/data/customer-1-15.data' with delimiter '|'
-- Make sure we do not crash if one table has no shards -- Make sure we do not crash if one table has no shards
SELECT SELECT
min(l_custkey), max(l_custkey) min(l_custkey), max(l_custkey)
@ -84,7 +84,7 @@ LOG: join order: [ "multi_outer_join_third" ][ broadcast join "multi_outer_join
(1 row) (1 row)
-- Third table is a single shard table with all data -- Third table is a single shard table with all data
\COPY multi_outer_join_third FROM '@abs_srcdir@/data/customer-1-30.data' with delimiter '|' \copy multi_outer_join_third FROM '@abs_srcdir@/data/customer-1-30.data' with delimiter '|'
-- Regular outer join should return results for all rows -- Regular outer join should return results for all rows
SELECT SELECT
min(l_custkey), max(l_custkey) min(l_custkey), max(l_custkey)
@ -202,7 +202,7 @@ LOG: join order: [ "multi_outer_join_left" ][ broadcast join "multi_outer_join_
(1 row) (1 row)
-- Turn the right table into a large table -- Turn the right table into a large table
\COPY multi_outer_join_right FROM '@abs_srcdir@/data/customer-21-30.data' with delimiter '|' \copy multi_outer_join_right FROM '@abs_srcdir@/data/customer-21-30.data' with delimiter '|'
-- Shards do not have 1-1 matching. We should error here. -- Shards do not have 1-1 matching. We should error here.
SELECT SELECT
min(l_custkey), max(l_custkey) min(l_custkey), max(l_custkey)
@ -224,10 +224,10 @@ SELECT * FROM master_apply_delete_command('DELETE FROM multi_outer_join_right');
(1 row) (1 row)
-- reload shards with 1-1 matching -- reload shards with 1-1 matching
\COPY multi_outer_join_left FROM '@abs_srcdir@/data/customer-1-15.data' with delimiter '|' \copy multi_outer_join_left FROM '@abs_srcdir@/data/customer-1-15.data' with delimiter '|'
\COPY multi_outer_join_left FROM '@abs_srcdir@/data/customer-21-30.data' with delimiter '|' \copy multi_outer_join_left FROM '@abs_srcdir@/data/customer-21-30.data' with delimiter '|'
\COPY multi_outer_join_right FROM '@abs_srcdir@/data/customer-11-20.data' with delimiter '|' \copy multi_outer_join_right FROM '@abs_srcdir@/data/customer-11-20.data' with delimiter '|'
\COPY multi_outer_join_right FROM '@abs_srcdir@/data/customer-21-30.data' with delimiter '|' \copy multi_outer_join_right FROM '@abs_srcdir@/data/customer-21-30.data' with delimiter '|'
-- multi_outer_join_third is a single shard table -- multi_outer_join_third is a single shard table
-- Regular left join should work as expected -- Regular left join should work as expected
SELECT SELECT
@ -754,7 +754,7 @@ LIMIT 20;
ERROR: cannot perform distributed planning on this query ERROR: cannot perform distributed planning on this query
DETAIL: Subqueries in outer joins are not supported DETAIL: Subqueries in outer joins are not supported
-- Add a shard to the left table that overlaps with multiple shards in the right -- Add a shard to the left table that overlaps with multiple shards in the right
\COPY multi_outer_join_left FROM '@abs_srcdir@/data/customer.1.data' with delimiter '|' \copy multi_outer_join_left FROM '@abs_srcdir@/data/customer.1.data' with delimiter '|'
-- All outer joins should error out -- All outer joins should error out
SELECT SELECT
min(l_custkey), max(l_custkey) min(l_custkey), max(l_custkey)

View File

@ -7,11 +7,11 @@
-- policy is left to the default value (round-robin) to test the common install case. -- policy is left to the default value (round-robin) to test the common install case.
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 290000; ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 290000;
ALTER SEQUENCE pg_catalog.pg_dist_jobid_seq RESTART 290000; ALTER SEQUENCE pg_catalog.pg_dist_jobid_seq RESTART 290000;
\COPY lineitem FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|' \copy lineitem FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
\COPY lineitem FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|' \copy lineitem FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|'
\COPY orders FROM '@abs_srcdir@/data/orders.1.data' with delimiter '|' \copy orders FROM '@abs_srcdir@/data/orders.1.data' with delimiter '|'
\COPY orders FROM '@abs_srcdir@/data/orders.2.data' with delimiter '|' \copy orders FROM '@abs_srcdir@/data/orders.2.data' with delimiter '|'
\COPY customer FROM '@abs_srcdir@/data/customer.1.data' with delimiter '|' \copy customer FROM '@abs_srcdir@/data/customer.1.data' with delimiter '|'
\COPY nation FROM '@abs_srcdir@/data/nation.data' with delimiter '|' \copy nation FROM '@abs_srcdir@/data/nation.data' with delimiter '|'
\COPY part FROM '@abs_srcdir@/data/part.data' with delimiter '|' \copy part FROM '@abs_srcdir@/data/part.data' with delimiter '|'
\COPY supplier FROM '@abs_srcdir@/data/supplier.data' with delimiter '|' \copy supplier FROM '@abs_srcdir@/data/supplier.data' with delimiter '|'

View File

@ -14,7 +14,7 @@ SELECT master_create_distributed_table('large_records_table', 'data_id', 'append
(1 row) (1 row)
\COPY large_records_table FROM '@abs_srcdir@/data/large_records.data' with delimiter '|' \copy large_records_table FROM '@abs_srcdir@/data/large_records.data' with delimiter '|'
SELECT shardminvalue, shardmaxvalue FROM pg_dist_shard, pg_class SELECT shardminvalue, shardmaxvalue FROM pg_dist_shard, pg_class
WHERE pg_class.oid=logicalrelid AND relname='large_records_table' WHERE pg_class.oid=logicalrelid AND relname='large_records_table'
ORDER BY shardid; ORDER BY shardid;

View File

@ -6,6 +6,6 @@ ALTER SEQUENCE pg_catalog.pg_dist_jobid_seq RESTART 280000;
-- We stage more data to customer and part tables to test distributed joins. The -- We stage more data to customer and part tables to test distributed joins. The
-- staging causes the planner to consider customer and part tables as large, and -- staging causes the planner to consider customer and part tables as large, and
-- evaluate plans where some of the underlying tables need to be repartitioned. -- evaluate plans where some of the underlying tables need to be repartitioned.
\COPY customer FROM '@abs_srcdir@/data/customer.2.data' with delimiter '|' \copy customer FROM '@abs_srcdir@/data/customer.2.data' with delimiter '|'
\COPY customer FROM '@abs_srcdir@/data/customer.3.data' with delimiter '|' \copy customer FROM '@abs_srcdir@/data/customer.3.data' with delimiter '|'
\COPY part FROM '@abs_srcdir@/data/part.more.data' with delimiter '|' \copy part FROM '@abs_srcdir@/data/part.more.data' with delimiter '|'

View File

@ -100,10 +100,10 @@ SELECT master_create_empty_shard('orders_subquery') AS new_shard_id
UPDATE pg_dist_shard SET shardminvalue = 8997, shardmaxvalue = 14946 UPDATE pg_dist_shard SET shardminvalue = 8997, shardmaxvalue = 14946
WHERE shardid = :new_shard_id; WHERE shardid = :new_shard_id;
SET citus.shard_max_size TO "1MB"; SET citus.shard_max_size TO "1MB";
\COPY lineitem_subquery FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|' \copy lineitem_subquery FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
\COPY lineitem_subquery FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|' \copy lineitem_subquery FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|'
\COPY orders_subquery FROM '@abs_srcdir@/data/orders.1.data' with delimiter '|' \copy orders_subquery FROM '@abs_srcdir@/data/orders.1.data' with delimiter '|'
\COPY orders_subquery FROM '@abs_srcdir@/data/orders.2.data' with delimiter '|' \copy orders_subquery FROM '@abs_srcdir@/data/orders.2.data' with delimiter '|'
-- Check that we error out if shard min/max values are not exactly same. -- Check that we error out if shard min/max values are not exactly same.
SELECT SELECT
avg(unit_price) avg(unit_price)

View File

@ -65,7 +65,7 @@ CREATE TABLE test_count_distinct_schema.nation_hash(
SELECT master_create_distributed_table('test_count_distinct_schema.nation_hash', 'n_nationkey', 'hash'); SELECT master_create_distributed_table('test_count_distinct_schema.nation_hash', 'n_nationkey', 'hash');
SELECT master_create_worker_shards('test_count_distinct_schema.nation_hash', 4, 2); SELECT master_create_worker_shards('test_count_distinct_schema.nation_hash', 4, 2);
\COPY test_count_distinct_schema.nation_hash FROM STDIN with delimiter '|'; \copy test_count_distinct_schema.nation_hash FROM STDIN with delimiter '|';
0|ALGERIA|0|haggle. carefully final deposits detect slyly agai 0|ALGERIA|0|haggle. carefully final deposits detect slyly agai
1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon 1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon
2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special 2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special

View File

@ -18,7 +18,7 @@ CREATE TABLE public.nation_local(
n_comment varchar(152) n_comment varchar(152)
); );
\COPY public.nation_local FROM STDIN with delimiter '|'; \copy public.nation_local FROM STDIN with delimiter '|';
0|ALGERIA|0|haggle. carefully final deposits detect slyly agai 0|ALGERIA|0|haggle. carefully final deposits detect slyly agai
1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon 1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon
2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special 2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special
@ -85,7 +85,7 @@ CREATE TABLE nation_append_search_path(
); );
SELECT master_create_distributed_table('nation_append_search_path', 'n_nationkey', 'append'); SELECT master_create_distributed_table('nation_append_search_path', 'n_nationkey', 'append');
\COPY nation_append_search_path FROM STDIN with delimiter '|'; \copy nation_append_search_path FROM STDIN with delimiter '|';
0|ALGERIA|0|haggle. carefully final deposits detect slyly agai 0|ALGERIA|0|haggle. carefully final deposits detect slyly agai
1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon 1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon
2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special 2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special
@ -146,7 +146,7 @@ SELECT * FROM nation_hash WHERE n_nationkey = 7;
-- test UDFs with schemas -- test UDFs with schemas
SET search_path TO public; SET search_path TO public;
\COPY test_schema_support.nation_hash FROM STDIN with delimiter '|'; \copy test_schema_support.nation_hash FROM STDIN with delimiter '|';
0|ALGERIA|0|haggle. carefully final deposits detect slyly agai 0|ALGERIA|0|haggle. carefully final deposits detect slyly agai
1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon 1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon
2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special 2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special
@ -337,7 +337,7 @@ CREATE TABLE test_schema_support.nation_hash_collation(
SELECT master_create_distributed_table('test_schema_support.nation_hash_collation', 'n_nationkey', 'hash'); SELECT master_create_distributed_table('test_schema_support.nation_hash_collation', 'n_nationkey', 'hash');
SELECT master_create_worker_shards('test_schema_support.nation_hash_collation', 4, 2); SELECT master_create_worker_shards('test_schema_support.nation_hash_collation', 4, 2);
\COPY test_schema_support.nation_hash_collation FROM STDIN with delimiter '|'; \copy test_schema_support.nation_hash_collation FROM STDIN with delimiter '|';
0|ALGERIA|0|haggle. carefully final deposits detect slyly agai 0|ALGERIA|0|haggle. carefully final deposits detect slyly agai
1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon 1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon
2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special 2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special
@ -360,7 +360,7 @@ CREATE TABLE nation_hash_collation_search_path(
SELECT master_create_distributed_table('nation_hash_collation_search_path', 'n_nationkey', 'hash'); SELECT master_create_distributed_table('nation_hash_collation_search_path', 'n_nationkey', 'hash');
SELECT master_create_worker_shards('nation_hash_collation_search_path', 4, 2); SELECT master_create_worker_shards('nation_hash_collation_search_path', 4, 2);
\COPY nation_hash_collation_search_path FROM STDIN with delimiter '|'; \copy nation_hash_collation_search_path FROM STDIN with delimiter '|';
0|ALGERIA|0|haggle. carefully final deposits detect slyly agai 0|ALGERIA|0|haggle. carefully final deposits detect slyly agai
1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon 1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon
2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special 2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special
@ -396,7 +396,7 @@ SELECT master_create_distributed_table('test_schema_support.nation_hash_composit
SELECT master_create_worker_shards('test_schema_support.nation_hash_composite_types', 4, 2); SELECT master_create_worker_shards('test_schema_support.nation_hash_composite_types', 4, 2);
-- insert some data to verify composite type queries -- insert some data to verify composite type queries
\COPY test_schema_support.nation_hash_composite_types FROM STDIN with delimiter '|'; \copy test_schema_support.nation_hash_composite_types FROM STDIN with delimiter '|';
0|ALGERIA|0|haggle. carefully final deposits detect slyly agai|(a,a) 0|ALGERIA|0|haggle. carefully final deposits detect slyly agai|(a,a)
1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon|(a,b) 1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon|(a,b)
2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special |(a,c) 2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special |(a,c)
@ -531,7 +531,7 @@ SELECT master_apply_delete_command('DELETE FROM test_schema_support.nation_appen
-- test with search_path is set -- test with search_path is set
SET search_path TO test_schema_support; SET search_path TO test_schema_support;
\COPY nation_append FROM STDIN with delimiter '|'; \copy nation_append FROM STDIN with delimiter '|';
0|ALGERIA|0| haggle. carefully final deposits detect slyly agai 0|ALGERIA|0| haggle. carefully final deposits detect slyly agai
1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon 1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon
2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special 2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special
@ -578,7 +578,7 @@ CREATE TABLE test_schema_support_join_2.nation_hash (
SELECT master_create_distributed_table('test_schema_support_join_1.nation_hash', 'n_nationkey', 'hash'); SELECT master_create_distributed_table('test_schema_support_join_1.nation_hash', 'n_nationkey', 'hash');
SELECT master_create_worker_shards('test_schema_support_join_1.nation_hash', 4, 1); SELECT master_create_worker_shards('test_schema_support_join_1.nation_hash', 4, 1);
\COPY test_schema_support_join_1.nation_hash FROM STDIN with delimiter '|'; \copy test_schema_support_join_1.nation_hash FROM STDIN with delimiter '|';
0|ALGERIA|0|haggle. carefully final deposits detect slyly agai 0|ALGERIA|0|haggle. carefully final deposits detect slyly agai
1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon 1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon
2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special 2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special
@ -590,7 +590,7 @@ SELECT master_create_worker_shards('test_schema_support_join_1.nation_hash', 4,
SELECT master_create_distributed_table('test_schema_support_join_1.nation_hash_2', 'n_nationkey', 'hash'); SELECT master_create_distributed_table('test_schema_support_join_1.nation_hash_2', 'n_nationkey', 'hash');
SELECT master_create_worker_shards('test_schema_support_join_1.nation_hash_2', 4, 1); SELECT master_create_worker_shards('test_schema_support_join_1.nation_hash_2', 4, 1);
\COPY test_schema_support_join_1.nation_hash_2 FROM STDIN with delimiter '|'; \copy test_schema_support_join_1.nation_hash_2 FROM STDIN with delimiter '|';
0|ALGERIA|0|haggle. carefully final deposits detect slyly agai 0|ALGERIA|0|haggle. carefully final deposits detect slyly agai
1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon 1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon
2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special 2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special
@ -602,7 +602,7 @@ SELECT master_create_worker_shards('test_schema_support_join_1.nation_hash_2', 4
SELECT master_create_distributed_table('test_schema_support_join_2.nation_hash', 'n_nationkey', 'hash'); SELECT master_create_distributed_table('test_schema_support_join_2.nation_hash', 'n_nationkey', 'hash');
SELECT master_create_worker_shards('test_schema_support_join_2.nation_hash', 4, 1); SELECT master_create_worker_shards('test_schema_support_join_2.nation_hash', 4, 1);
\COPY test_schema_support_join_2.nation_hash FROM STDIN with delimiter '|'; \copy test_schema_support_join_2.nation_hash FROM STDIN with delimiter '|';
0|ALGERIA|0|haggle. carefully final deposits detect slyly agai 0|ALGERIA|0|haggle. carefully final deposits detect slyly agai
1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon 1|ARGENTINA|1|al foxes promise slyly according to the regular accounts. bold requests alon
2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special 2|BRAZIL|1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special