--
-- MULTI_MX_COPY_DATA
--

\COPY nation_hash FROM '@abs_srcdir@/data/nation.data' with delimiter '|';

SET search_path TO citus_mx_test_schema;
\COPY nation_hash FROM '@abs_srcdir@/data/nation.data' with delimiter '|';
\COPY citus_mx_test_schema_join_1.nation_hash FROM '@abs_srcdir@/data/nation.data' with delimiter '|';
\COPY citus_mx_test_schema_join_1.nation_hash_2 FROM '@abs_srcdir@/data/nation.data' with delimiter '|';
\COPY citus_mx_test_schema_join_2.nation_hash FROM '@abs_srcdir@/data/nation.data' with delimiter '|';

-- now try loading data from worker node
\c - - - :worker_1_port
SET search_path TO public;

\COPY lineitem_mx FROM '@abs_srcdir@/data/lineitem.1.data' with delimiter '|'
\COPY lineitem_mx FROM '@abs_srcdir@/data/lineitem.2.data' with delimiter '|'

\c - - - :worker_2_port
-- and use second worker as well
\COPY orders_mx FROM '@abs_srcdir@/data/orders.1.data' with delimiter '|'
\COPY orders_mx FROM '@abs_srcdir@/data/orders.2.data' with delimiter '|'

-- These copies were intended to test copying data to single sharded table from
-- worker nodes, yet in order to remove broadcast logic related codes we change
-- the table to reference table and copy data from master. Should be updated
-- when worker nodes gain capability to run dml commands on reference tables.
\c - - - :master_port
SET search_path TO public;

\COPY customer_mx FROM '@abs_srcdir@/data/customer.1.data' with delimiter '|'
\COPY nation_mx FROM '@abs_srcdir@/data/nation.data' with delimiter '|'
\COPY part_mx FROM '@abs_srcdir@/data/part.data' with delimiter '|'
\COPY supplier_mx FROM '@abs_srcdir@/data/supplier.data' with delimiter '|'
