mirror of https://github.com/citusdata/citus.git
Lowercase \copy to match PostgreSQL's style for local/psql-level functions
parent
b513f1c911
commit
0322916700
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
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
|
||||
set -euo pipefail
|
||||
|
|
|
@ -123,7 +123,7 @@ SELECT master_create_worker_shards('test_count_distinct_schema.nation_hash', 4,
|
|||
|
||||
(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 citus.count_distinct_error_rate TO 0.01;
|
||||
SELECT COUNT (DISTINCT n_regionkey) FROM test_count_distinct_schema.nation_hash;
|
||||
|
|
|
@ -13,7 +13,7 @@ CREATE TABLE public.nation_local(
|
|||
n_regionkey integer not null,
|
||||
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(
|
||||
n_nationkey integer 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)
|
||||
|
||||
\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 TABLE test_schema_support.nation_hash(
|
||||
n_nationkey integer not null,
|
||||
|
@ -192,7 +192,7 @@ SELECT * FROM nation_hash WHERE n_nationkey = 7;
|
|||
|
||||
-- test UDFs with schemas
|
||||
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 OR REPLACE FUNCTION dummyFunction(theValue integer)
|
||||
RETURNS text AS
|
||||
|
@ -446,7 +446,7 @@ SELECT master_create_worker_shards('test_schema_support.nation_hash_collation',
|
|||
|
||||
(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;
|
||||
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)
|
||||
|
||||
\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;
|
||||
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)
|
||||
|
||||
-- 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;
|
||||
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
|
||||
-- test with search_path is set
|
||||
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') ;
|
||||
master_apply_delete_command
|
||||
-----------------------------
|
||||
|
@ -873,7 +873,7 @@ SELECT master_create_worker_shards('test_schema_support_join_1.nation_hash', 4,
|
|||
|
||||
(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');
|
||||
master_create_distributed_table
|
||||
---------------------------------
|
||||
|
@ -886,7 +886,7 @@ SELECT master_create_worker_shards('test_schema_support_join_1.nation_hash_2', 4
|
|||
|
||||
(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');
|
||||
master_create_distributed_table
|
||||
---------------------------------
|
||||
|
@ -899,7 +899,7 @@ SELECT master_create_worker_shards('test_schema_support_join_2.nation_hash', 4,
|
|||
|
||||
(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,
|
||||
-- join of two tables which are in different schemas,
|
||||
-- join on partition column
|
||||
|
|
|
@ -38,8 +38,8 @@ UPDATE pg_dist_shard SET shardminvalue = 8997, shardmaxvalue = 14947
|
|||
WHERE shardid = :new_shard_id;
|
||||
|
||||
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.2.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 '|'
|
||||
RESET citus.shard_max_size;
|
||||
|
||||
-- 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_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.2.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 '|'
|
||||
|
||||
-- aggregate(distinct) on partition column is allowed
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ CREATE TABLE aggregate_type (
|
|||
interval_value interval not null);
|
||||
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
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ CREATE TABLE lineitem_alter (
|
|||
l_comment varchar(44) not null
|
||||
);
|
||||
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
|
||||
|
||||
|
@ -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 int_column1 DROP DEFAULT;
|
||||
|
||||
-- \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 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 '|'
|
||||
|
||||
SELECT float_column, count(*) FROM lineitem_alter GROUP BY float_column;
|
||||
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
|
||||
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
|
||||
\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
|
||||
|
||||
ALTER TABLE lineitem_alter ALTER COLUMN int_column2 DROP NOT NULL;
|
||||
\d lineitem_alter
|
||||
|
||||
-- \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 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 '|'
|
||||
SELECT count(*) from lineitem_alter;
|
||||
|
||||
-- Verify that SET DATA TYPE works
|
||||
|
|
|
@ -32,12 +32,12 @@ SELECT master_create_worker_shards('multi_append_table_to_shard_right_hash', 1,
|
|||
|
||||
-- Replicate 'left' table on both workers
|
||||
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
|
||||
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
|
||||
SELECT set_config('citus.shard_replication_factor', '2', false);
|
||||
|
|
|
@ -29,8 +29,8 @@ CREATE TABLE lineitem_hash (
|
|||
SELECT master_create_distributed_table('lineitem_hash', 'l_orderkey', 'hash');
|
||||
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.2.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 '|'
|
||||
|
||||
SET citus.task_executor_type to "task-tracker";
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ COPY customer_copy_hash FROM '@abs_srcdir@/data/customer.2.data' WITH (DELIMITER
|
|||
SELECT count(*) FROM customer_copy_hash;
|
||||
|
||||
-- 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
|
||||
SELECT count(*) FROM customer_copy_hash;
|
||||
|
|
|
@ -11,6 +11,6 @@ CREATE TABLE nation (
|
|||
n_comment varchar(152));
|
||||
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;
|
||||
|
|
|
@ -13,8 +13,8 @@ ALTER SEQUENCE pg_catalog.pg_dist_jobid_seq RESTART 9000000;
|
|||
|
||||
-- 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.2.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 '|'
|
||||
|
||||
-- Query #1 from the TPC-H decision support benchmark.
|
||||
|
||||
|
|
|
@ -19,9 +19,9 @@ CREATE TABLE customer_delete_protocol (
|
|||
c_comment varchar(117) not null);
|
||||
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.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.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.3.data' with delimiter '|'
|
||||
|
||||
-- Testing master_apply_delete_command
|
||||
-- Check that we don't support conditions on columns other than partition key.
|
||||
|
|
|
@ -53,11 +53,11 @@ FROM
|
|||
multi_outer_join_left a LEFT JOIN multi_outer_join_third b ON (l_custkey = t_custkey);
|
||||
|
||||
-- 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-11-20.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 '|'
|
||||
|
||||
-- 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
|
||||
SELECT
|
||||
|
@ -71,7 +71,7 @@ FROM
|
|||
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
|
||||
\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
|
||||
SELECT
|
||||
|
@ -150,7 +150,7 @@ FROM
|
|||
|
||||
|
||||
-- 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.
|
||||
|
@ -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');
|
||||
|
||||
-- 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-21-30.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_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-11-20.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
|
||||
|
||||
|
@ -409,7 +409,7 @@ ORDER BY cnt DESC, l1.l_custkey DESC
|
|||
LIMIT 20;
|
||||
|
||||
-- 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
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_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.2.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 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.1.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 nation FROM '@abs_srcdir@/data/nation.data' with delimiter '|'
|
||||
\COPY part FROM '@abs_srcdir@/data/part.data' with delimiter '|'
|
||||
\COPY supplier FROM '@abs_srcdir@/data/supplier.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 part FROM '@abs_srcdir@/data/part.data' with delimiter '|'
|
||||
\copy supplier FROM '@abs_srcdir@/data/supplier.data' with delimiter '|'
|
|
@ -15,7 +15,7 @@ SET citus.shard_max_size TO "256kB";
|
|||
CREATE TABLE large_records_table (data_id integer, data text);
|
||||
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
|
||||
WHERE pg_class.oid=logicalrelid AND relname='large_records_table'
|
||||
|
|
|
@ -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
|
||||
-- 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.3.data' with delimiter '|'
|
||||
\COPY part FROM '@abs_srcdir@/data/part.more.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 part FROM '@abs_srcdir@/data/part.more.data' with delimiter '|'
|
||||
|
|
|
@ -101,11 +101,11 @@ WHERE shardid = :new_shard_id;
|
|||
|
||||
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.2.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 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.1.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.
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@ SELECT master_create_empty_shard('lineitem_range') AS new_shard_id
|
|||
UPDATE pg_dist_shard SET shardminvalue = 8997, shardmaxvalue = 14947
|
||||
WHERE shardid = :new_shard_id;
|
||||
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.2.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 '|'
|
||||
RESET citus.shard_max_size;
|
||||
-- Run aggregate(distinct) on partition column for range partitioned table
|
||||
SELECT count(distinct l_orderkey) FROM lineitem_range;
|
||||
|
@ -139,8 +139,8 @@ SELECT master_create_worker_shards('lineitem_hash', 4, 1);
|
|||
|
||||
(1 row)
|
||||
|
||||
\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.1.data' with delimiter '|'
|
||||
\copy lineitem_hash FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|'
|
||||
-- aggregate(distinct) on partition column is allowed
|
||||
SELECT count(distinct l_orderkey) FROM lineitem_hash;
|
||||
count
|
||||
|
|
|
@ -41,7 +41,7 @@ SELECT master_create_distributed_table('aggregate_type', 'float_value', 'append'
|
|||
|
||||
(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
|
||||
SELECT min(float_value), max(float_value),
|
||||
sum(float_value), count(float_value), avg(float_value)
|
||||
|
|
|
@ -30,7 +30,7 @@ SELECT master_create_distributed_table('lineitem_alter', 'l_orderkey', 'append')
|
|||
|
||||
(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
|
||||
ALTER TABLE lineitem_alter ADD COLUMN float_column FLOAT;
|
||||
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
|
||||
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;
|
||||
-- \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 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 '|'
|
||||
SELECT float_column, count(*) FROM lineitem_alter GROUP BY float_column;
|
||||
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
|
||||
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
|
||||
\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
|
||||
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
|
||||
|
@ -200,8 +200,8 @@ ALTER TABLE lineitem_alter ALTER COLUMN int_column2 DROP NOT NULL;
|
|||
int_column2 | integer |
|
||||
null_column | integer |
|
||||
|
||||
-- \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 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 '|'
|
||||
SELECT count(*) from lineitem_alter;
|
||||
count
|
||||
-------
|
||||
|
|
|
@ -50,8 +50,8 @@ SELECT set_config('citus.shard_replication_factor', '2', false);
|
|||
2
|
||||
(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
|
||||
SELECT set_config('citus.shard_replication_factor', '1', false);
|
||||
set_config
|
||||
|
@ -59,7 +59,7 @@ SELECT set_config('citus.shard_replication_factor', '1', false);
|
|||
1
|
||||
(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
|
||||
SELECT set_config('citus.shard_replication_factor', '2', false);
|
||||
set_config
|
||||
|
|
|
@ -34,8 +34,8 @@ SELECT master_create_worker_shards('lineitem_hash', 8, 1);
|
|||
|
||||
(1 row)
|
||||
|
||||
\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.1.data' with delimiter '|'
|
||||
\copy lineitem_hash FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|'
|
||||
SET citus.task_executor_type to "task-tracker";
|
||||
-- count(distinct) is supported on top level query if there
|
||||
-- is a grouping on the partition key
|
||||
|
|
|
@ -118,7 +118,7 @@ SELECT count(*) FROM customer_copy_hash;
|
|||
(1 row)
|
||||
|
||||
-- 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
|
||||
SELECT count(*) FROM customer_copy_hash;
|
||||
count
|
||||
|
|
|
@ -12,7 +12,7 @@ SELECT master_create_distributed_table('tpch.nation', 'n_nationkey', 'append');
|
|||
|
||||
(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;
|
||||
count
|
||||
-------
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 100200300400500;
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_jobid_seq RESTART 9000000;
|
||||
-- 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.2.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 '|'
|
||||
-- Query #1 from the TPC-H decision support benchmark.
|
||||
SELECT
|
||||
l_returnflag,
|
||||
|
|
|
@ -19,9 +19,9 @@ SELECT master_create_distributed_table('customer_delete_protocol', 'c_custkey',
|
|||
|
||||
(1 row)
|
||||
|
||||
\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.3.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.3.data' with delimiter '|'
|
||||
-- Testing master_apply_delete_command
|
||||
-- Check that we don't support conditions on columns other than partition key.
|
||||
SELECT master_apply_delete_command('DELETE FROM customer_delete_protocol
|
||||
|
|
|
@ -62,10 +62,10 @@ FROM
|
|||
ERROR: cannot perform distributed planning on this query
|
||||
DETAIL: Shards of relations in outer join queries must have 1-to-1 shard partitioning
|
||||
-- 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-11-20.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 '|'
|
||||
-- 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
|
||||
SELECT
|
||||
min(l_custkey), max(l_custkey)
|
||||
|
@ -84,7 +84,7 @@ LOG: join order: [ "multi_outer_join_third" ][ broadcast join "multi_outer_join
|
|||
(1 row)
|
||||
|
||||
-- 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
|
||||
SELECT
|
||||
min(l_custkey), max(l_custkey)
|
||||
|
@ -202,7 +202,7 @@ LOG: join order: [ "multi_outer_join_left" ][ broadcast join "multi_outer_join_
|
|||
(1 row)
|
||||
|
||||
-- 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.
|
||||
SELECT
|
||||
min(l_custkey), max(l_custkey)
|
||||
|
@ -224,10 +224,10 @@ SELECT * FROM master_apply_delete_command('DELETE FROM multi_outer_join_right');
|
|||
(1 row)
|
||||
|
||||
-- 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-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-21-30.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_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 '|'
|
||||
-- multi_outer_join_third is a single shard table
|
||||
-- Regular left join should work as expected
|
||||
SELECT
|
||||
|
@ -754,7 +754,7 @@ LIMIT 20;
|
|||
ERROR: cannot perform distributed planning on this query
|
||||
DETAIL: Subqueries in outer joins are not supported
|
||||
-- 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
|
||||
SELECT
|
||||
min(l_custkey), max(l_custkey)
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
-- 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_jobid_seq RESTART 290000;
|
||||
\COPY lineitem FROM '@abs_srcdir@/data/lineitem.1.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.2.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 part FROM '@abs_srcdir@/data/part.data' with delimiter '|'
|
||||
\COPY supplier FROM '@abs_srcdir@/data/supplier.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 orders FROM '@abs_srcdir@/data/orders.1.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 nation FROM '@abs_srcdir@/data/nation.data' with delimiter '|'
|
||||
\copy part FROM '@abs_srcdir@/data/part.data' with delimiter '|'
|
||||
\copy supplier FROM '@abs_srcdir@/data/supplier.data' with delimiter '|'
|
||||
|
|
|
@ -14,7 +14,7 @@ SELECT master_create_distributed_table('large_records_table', 'data_id', 'append
|
|||
|
||||
(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
|
||||
WHERE pg_class.oid=logicalrelid AND relname='large_records_table'
|
||||
ORDER BY shardid;
|
||||
|
|
|
@ -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
|
||||
-- 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.
|
||||
\COPY customer FROM '@abs_srcdir@/data/customer.2.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 customer FROM '@abs_srcdir@/data/customer.2.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 '|'
|
||||
|
|
|
@ -100,10 +100,10 @@ SELECT master_create_empty_shard('orders_subquery') AS new_shard_id
|
|||
UPDATE pg_dist_shard SET shardminvalue = 8997, shardmaxvalue = 14946
|
||||
WHERE shardid = :new_shard_id;
|
||||
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.2.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 lineitem_subquery FROM '@abs_srcdir@/data/lineitem.1.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.2.data' with delimiter '|'
|
||||
-- Check that we error out if shard min/max values are not exactly same.
|
||||
SELECT
|
||||
avg(unit_price)
|
||||
|
|
|
@ -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_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
|
||||
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
|
||||
|
|
|
@ -18,7 +18,7 @@ CREATE TABLE public.nation_local(
|
|||
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
|
||||
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
|
||||
|
@ -85,7 +85,7 @@ CREATE TABLE nation_append_search_path(
|
|||
);
|
||||
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
|
||||
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
|
||||
|
@ -146,7 +146,7 @@ SELECT * FROM nation_hash WHERE n_nationkey = 7;
|
|||
-- test UDFs with schemas
|
||||
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
|
||||
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
|
||||
|
@ -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_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
|
||||
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
|
||||
|
@ -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_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
|
||||
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
|
||||
|
@ -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);
|
||||
|
||||
-- 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)
|
||||
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)
|
||||
|
@ -531,7 +531,7 @@ SELECT master_apply_delete_command('DELETE FROM test_schema_support.nation_appen
|
|||
-- test with search_path is set
|
||||
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
|
||||
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
|
||||
|
@ -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_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
|
||||
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
|
||||
|
@ -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_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
|
||||
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
|
||||
|
@ -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_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
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue