mirror of https://github.com/citusdata/citus.git
Add user ID suffixes to filenames in check-worker tests
parent
6aa5592e52
commit
4245032849
|
@ -8,6 +8,11 @@
|
||||||
\set TablePart00 lineitem_partition_task_part_00
|
\set TablePart00 lineitem_partition_task_part_00
|
||||||
\set TablePart01 lineitem_partition_task_part_01
|
\set TablePart01 lineitem_partition_task_part_01
|
||||||
\set TablePart02 lineitem_partition_task_part_02
|
\set TablePart02 lineitem_partition_task_part_02
|
||||||
|
SELECT usesysid AS userid FROM pg_user WHERE usename = current_user \gset
|
||||||
|
\set File_Basedir base/pgsql_job_cache
|
||||||
|
\set Table_File_00 :File_Basedir/job_:JobId/task_:PartitionTaskId/p_00000.:userid
|
||||||
|
\set Table_File_01 :File_Basedir/job_:JobId/task_:PartitionTaskId/p_00001.:userid
|
||||||
|
\set Table_File_02 :File_Basedir/job_:JobId/task_:PartitionTaskId/p_00002.:userid
|
||||||
-- We assign a partition task and wait for it to complete. Note that we hardcode
|
-- We assign a partition task and wait for it to complete. Note that we hardcode
|
||||||
-- the partition function call string, including the job and task identifiers,
|
-- the partition function call string, including the job and task identifiers,
|
||||||
-- into the argument in the task assignment function. This hardcoding is
|
-- into the argument in the task assignment function. This hardcoding is
|
||||||
|
@ -34,9 +39,9 @@ SELECT task_tracker_task_status(:JobId, :PartitionTaskId);
|
||||||
6
|
6
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
COPY :TablePart00 FROM 'base/pgsql_job_cache/job_401010/task_801106/p_00000';
|
COPY :TablePart00 FROM :'Table_File_00';
|
||||||
COPY :TablePart01 FROM 'base/pgsql_job_cache/job_401010/task_801106/p_00001';
|
COPY :TablePart01 FROM :'Table_File_01';
|
||||||
COPY :TablePart02 FROM 'base/pgsql_job_cache/job_401010/task_801106/p_00002';
|
COPY :TablePart02 FROM :'Table_File_02';
|
||||||
SELECT COUNT(*) FROM :TablePart00;
|
SELECT COUNT(*) FROM :TablePart00;
|
||||||
count
|
count
|
||||||
-------
|
-------
|
||||||
|
|
|
@ -12,6 +12,11 @@
|
||||||
\set Table_Part_00 binary_data_table_part_00
|
\set Table_Part_00 binary_data_table_part_00
|
||||||
\set Table_Part_01 binary_data_table_part_01
|
\set Table_Part_01 binary_data_table_part_01
|
||||||
\set Table_Part_02 binary_data_table_part_02
|
\set Table_Part_02 binary_data_table_part_02
|
||||||
|
SELECT usesysid AS userid FROM pg_user WHERE usename = current_user \gset
|
||||||
|
\set File_Basedir base/pgsql_job_cache
|
||||||
|
\set Table_File_00 :File_Basedir/job_:JobId/task_:TaskId/p_00000.:userid
|
||||||
|
\set Table_File_01 :File_Basedir/job_:JobId/task_:TaskId/p_00001.:userid
|
||||||
|
\set Table_File_02 :File_Basedir/job_:JobId/task_:TaskId/p_00002.:userid
|
||||||
-- Create table with special characters
|
-- Create table with special characters
|
||||||
CREATE TABLE :Table_Name(textcolumn text, binarycolumn bytea);
|
CREATE TABLE :Table_Name(textcolumn text, binarycolumn bytea);
|
||||||
COPY :Table_Name FROM stdin;
|
COPY :Table_Name FROM stdin;
|
||||||
|
@ -47,9 +52,9 @@ SELECT worker_range_partition_table(:JobId, :TaskId, :Select_Query_Text,
|
||||||
CREATE TABLE :Table_Part_00 ( LIKE :Table_Name );
|
CREATE TABLE :Table_Part_00 ( LIKE :Table_Name );
|
||||||
CREATE TABLE :Table_Part_01 ( LIKE :Table_Name );
|
CREATE TABLE :Table_Part_01 ( LIKE :Table_Name );
|
||||||
CREATE TABLE :Table_Part_02 ( LIKE :Table_Name );
|
CREATE TABLE :Table_Part_02 ( LIKE :Table_Name );
|
||||||
COPY :Table_Part_00 FROM 'base/pgsql_job_cache/job_201010/task_101105/p_00000';
|
COPY :Table_Part_00 FROM :'Table_File_00';
|
||||||
COPY :Table_Part_01 FROM 'base/pgsql_job_cache/job_201010/task_101105/p_00001';
|
COPY :Table_Part_01 FROM :'Table_File_01';
|
||||||
COPY :Table_Part_02 FROM 'base/pgsql_job_cache/job_201010/task_101105/p_00002';
|
COPY :Table_Part_02 FROM :'Table_File_02';
|
||||||
-- The union of the three partitions should have as many rows as original table
|
-- The union of the three partitions should have as many rows as original table
|
||||||
SELECT COUNT(*) AS total_row_count FROM (
|
SELECT COUNT(*) AS total_row_count FROM (
|
||||||
SELECT * FROM :Table_Part_00 UNION ALL
|
SELECT * FROM :Table_Part_00 UNION ALL
|
||||||
|
|
|
@ -16,6 +16,12 @@
|
||||||
\set Table_Part_01 lineitem_hash_part_01
|
\set Table_Part_01 lineitem_hash_part_01
|
||||||
\set Table_Part_02 lineitem_hash_part_02
|
\set Table_Part_02 lineitem_hash_part_02
|
||||||
\set Table_Part_03 lineitem_hash_part_03
|
\set Table_Part_03 lineitem_hash_part_03
|
||||||
|
SELECT usesysid AS userid FROM pg_user WHERE usename = current_user \gset
|
||||||
|
\set File_Basedir base/pgsql_job_cache
|
||||||
|
\set Table_File_00 :File_Basedir/job_:JobId/task_:TaskId/p_00000.:userid
|
||||||
|
\set Table_File_01 :File_Basedir/job_:JobId/task_:TaskId/p_00001.:userid
|
||||||
|
\set Table_File_02 :File_Basedir/job_:JobId/task_:TaskId/p_00002.:userid
|
||||||
|
\set Table_File_03 :File_Basedir/job_:JobId/task_:TaskId/p_00003.:userid
|
||||||
-- Run select query, and apply hash partitioning on query results
|
-- Run select query, and apply hash partitioning on query results
|
||||||
SELECT worker_hash_partition_table(:JobId, :TaskId, :Select_Query_Text,
|
SELECT worker_hash_partition_table(:JobId, :TaskId, :Select_Query_Text,
|
||||||
:Partition_Column_Text, :Partition_Column_Type::regtype,
|
:Partition_Column_Text, :Partition_Column_Type::regtype,
|
||||||
|
@ -25,10 +31,10 @@ SELECT worker_hash_partition_table(:JobId, :TaskId, :Select_Query_Text,
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
COPY :Table_Part_00 FROM 'base/pgsql_job_cache/job_201010/task_101103/p_00000';
|
COPY :Table_Part_00 FROM :'Table_File_00';
|
||||||
COPY :Table_Part_01 FROM 'base/pgsql_job_cache/job_201010/task_101103/p_00001';
|
COPY :Table_Part_01 FROM :'Table_File_01';
|
||||||
COPY :Table_Part_02 FROM 'base/pgsql_job_cache/job_201010/task_101103/p_00002';
|
COPY :Table_Part_02 FROM :'Table_File_02';
|
||||||
COPY :Table_Part_03 FROM 'base/pgsql_job_cache/job_201010/task_101103/p_00003';
|
COPY :Table_Part_03 FROM :'Table_File_03';
|
||||||
SELECT COUNT(*) FROM :Table_Part_00;
|
SELECT COUNT(*) FROM :Table_Part_00;
|
||||||
count
|
count
|
||||||
-------
|
-------
|
||||||
|
|
|
@ -15,6 +15,12 @@
|
||||||
\set Table_Part_01 lineitem_hash_complex_part_01
|
\set Table_Part_01 lineitem_hash_complex_part_01
|
||||||
\set Table_Part_02 lineitem_hash_complex_part_02
|
\set Table_Part_02 lineitem_hash_complex_part_02
|
||||||
\set Table_Part_03 lineitem_hash_complex_part_03
|
\set Table_Part_03 lineitem_hash_complex_part_03
|
||||||
|
SELECT usesysid AS userid FROM pg_user WHERE usename = current_user \gset
|
||||||
|
\set File_Basedir base/pgsql_job_cache
|
||||||
|
\set Table_File_00 :File_Basedir/job_:JobId/task_:TaskId/p_00000.:userid
|
||||||
|
\set Table_File_01 :File_Basedir/job_:JobId/task_:TaskId/p_00001.:userid
|
||||||
|
\set Table_File_02 :File_Basedir/job_:JobId/task_:TaskId/p_00002.:userid
|
||||||
|
\set Table_File_03 :File_Basedir/job_:JobId/task_:TaskId/p_00003.:userid
|
||||||
-- Run hardcoded complex select query, and apply hash partitioning on query
|
-- Run hardcoded complex select query, and apply hash partitioning on query
|
||||||
-- results
|
-- results
|
||||||
SELECT worker_hash_partition_table(:JobId, :TaskId,
|
SELECT worker_hash_partition_table(:JobId, :TaskId,
|
||||||
|
@ -30,10 +36,10 @@ SELECT worker_hash_partition_table(:JobId, :TaskId,
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- Copy partitioned data files into tables for testing purposes
|
-- Copy partitioned data files into tables for testing purposes
|
||||||
COPY :Table_Part_00 FROM 'base/pgsql_job_cache/job_201010/task_101104/p_00000';
|
COPY :Table_Part_00 FROM :'Table_File_00';
|
||||||
COPY :Table_Part_01 FROM 'base/pgsql_job_cache/job_201010/task_101104/p_00001';
|
COPY :Table_Part_01 FROM :'Table_File_01';
|
||||||
COPY :Table_Part_02 FROM 'base/pgsql_job_cache/job_201010/task_101104/p_00002';
|
COPY :Table_Part_02 FROM :'Table_File_02';
|
||||||
COPY :Table_Part_03 FROM 'base/pgsql_job_cache/job_201010/task_101104/p_00003';
|
COPY :Table_Part_03 FROM :'Table_File_03';
|
||||||
SELECT COUNT(*) FROM :Table_Part_00;
|
SELECT COUNT(*) FROM :Table_Part_00;
|
||||||
count
|
count
|
||||||
-------
|
-------
|
||||||
|
|
|
@ -11,6 +11,11 @@
|
||||||
\set Range_Table_Part_00 supplier_range_part_00
|
\set Range_Table_Part_00 supplier_range_part_00
|
||||||
\set Range_Table_Part_01 supplier_range_part_01
|
\set Range_Table_Part_01 supplier_range_part_01
|
||||||
\set Range_Table_Part_02 supplier_range_part_02
|
\set Range_Table_Part_02 supplier_range_part_02
|
||||||
|
SELECT usesysid AS userid FROM pg_user WHERE usename = current_user \gset
|
||||||
|
\set File_Basedir base/pgsql_job_cache
|
||||||
|
\set Range_Table_File_00 :File_Basedir/job_:JobId/task_:Range_TaskId/p_00000.:userid
|
||||||
|
\set Range_Table_File_01 :File_Basedir/job_:JobId/task_:Range_TaskId/p_00001.:userid
|
||||||
|
\set Range_Table_File_02 :File_Basedir/job_:JobId/task_:Range_TaskId/p_00002.:userid
|
||||||
-- Run select query, and apply range partitioning on query results. Note that
|
-- Run select query, and apply range partitioning on query results. Note that
|
||||||
-- one of the split point values is 0, We are checking here that the partition
|
-- one of the split point values is 0, We are checking here that the partition
|
||||||
-- function doesn't treat 0 as null, and that range repartitioning correctly
|
-- function doesn't treat 0 as null, and that range repartitioning correctly
|
||||||
|
@ -24,9 +29,9 @@ SELECT worker_range_partition_table(:JobId, :Range_TaskId, :Select_Query_Text,
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- Copy partitioned data files into tables for testing purposes
|
-- Copy partitioned data files into tables for testing purposes
|
||||||
COPY :Range_Table_Part_00 FROM 'base/pgsql_job_cache/job_201010/task_101106/p_00000';
|
COPY :Range_Table_Part_00 FROM :'Range_Table_File_00';
|
||||||
COPY :Range_Table_Part_01 FROM 'base/pgsql_job_cache/job_201010/task_101106/p_00001';
|
COPY :Range_Table_Part_01 FROM :'Range_Table_File_01';
|
||||||
COPY :Range_Table_Part_02 FROM 'base/pgsql_job_cache/job_201010/task_101106/p_00002';
|
COPY :Range_Table_Part_02 FROM :'Range_Table_File_02';
|
||||||
SELECT COUNT(*) FROM :Range_Table_Part_00;
|
SELECT COUNT(*) FROM :Range_Table_Part_00;
|
||||||
count
|
count
|
||||||
-------
|
-------
|
||||||
|
@ -103,6 +108,10 @@ SELECT COUNT(*) AS diff_rhs_02 FROM (
|
||||||
\set Hash_Table_Part_00 supplier_hash_part_00
|
\set Hash_Table_Part_00 supplier_hash_part_00
|
||||||
\set Hash_Table_Part_01 supplier_hash_part_01
|
\set Hash_Table_Part_01 supplier_hash_part_01
|
||||||
\set Hash_Table_Part_02 supplier_hash_part_02
|
\set Hash_Table_Part_02 supplier_hash_part_02
|
||||||
|
\set File_Basedir base/pgsql_job_cache
|
||||||
|
\set Hash_Table_File_00 :File_Basedir/job_:JobId/task_:Hash_TaskId/p_00000.:userid
|
||||||
|
\set Hash_Table_File_01 :File_Basedir/job_:JobId/task_:Hash_TaskId/p_00001.:userid
|
||||||
|
\set Hash_Table_File_02 :File_Basedir/job_:JobId/task_:Hash_TaskId/p_00002.:userid
|
||||||
-- Run select query, and apply hash partitioning on query results
|
-- Run select query, and apply hash partitioning on query results
|
||||||
SELECT worker_hash_partition_table(:JobId, :Hash_TaskId, :Select_Query_Text,
|
SELECT worker_hash_partition_table(:JobId, :Hash_TaskId, :Select_Query_Text,
|
||||||
:Partition_Column_Text, :Partition_Column_Type,
|
:Partition_Column_Text, :Partition_Column_Type,
|
||||||
|
@ -112,9 +121,9 @@ SELECT worker_hash_partition_table(:JobId, :Hash_TaskId, :Select_Query_Text,
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
COPY :Hash_Table_Part_00 FROM 'base/pgsql_job_cache/job_201010/task_101107/p_00000';
|
COPY :Hash_Table_Part_00 FROM :'Hash_Table_File_00';
|
||||||
COPY :Hash_Table_Part_01 FROM 'base/pgsql_job_cache/job_201010/task_101107/p_00001';
|
COPY :Hash_Table_Part_01 FROM :'Hash_Table_File_01';
|
||||||
COPY :Hash_Table_Part_02 FROM 'base/pgsql_job_cache/job_201010/task_101107/p_00002';
|
COPY :Hash_Table_Part_02 FROM :'Hash_Table_File_02';
|
||||||
SELECT COUNT(*) FROM :Hash_Table_Part_00;
|
SELECT COUNT(*) FROM :Hash_Table_Part_00;
|
||||||
count
|
count
|
||||||
-------
|
-------
|
||||||
|
|
|
@ -12,11 +12,12 @@
|
||||||
\set Table_Part_01 lineitem_range_part_01
|
\set Table_Part_01 lineitem_range_part_01
|
||||||
\set Table_Part_02 lineitem_range_part_02
|
\set Table_Part_02 lineitem_range_part_02
|
||||||
\set Table_Part_03 lineitem_range_part_03
|
\set Table_Part_03 lineitem_range_part_03
|
||||||
|
SELECT usesysid AS userid FROM pg_user WHERE usename = current_user \gset
|
||||||
\set File_Basedir base/pgsql_job_cache
|
\set File_Basedir base/pgsql_job_cache
|
||||||
\set Table_File_00 :File_Basedir/job_:JobId/task_:TaskId/p_00000
|
\set Table_File_00 :File_Basedir/job_:JobId/task_:TaskId/p_00000.:userid
|
||||||
\set Table_File_01 :File_Basedir/job_:JobId/task_:TaskId/p_00001
|
\set Table_File_01 :File_Basedir/job_:JobId/task_:TaskId/p_00001.:userid
|
||||||
\set Table_File_02 :File_Basedir/job_:JobId/task_:TaskId/p_00002
|
\set Table_File_02 :File_Basedir/job_:JobId/task_:TaskId/p_00002.:userid
|
||||||
\set Table_File_03 :File_Basedir/job_:JobId/task_:TaskId/p_00003
|
\set Table_File_03 :File_Basedir/job_:JobId/task_:TaskId/p_00003.:userid
|
||||||
-- Run select query, and apply range partitioning on query results
|
-- Run select query, and apply range partitioning on query results
|
||||||
SELECT worker_range_partition_table(:JobId, :TaskId, :Select_Query_Text,
|
SELECT worker_range_partition_table(:JobId, :TaskId, :Select_Query_Text,
|
||||||
:Partition_Column_Text, :Partition_Column_Type,
|
:Partition_Column_Text, :Partition_Column_Type,
|
||||||
|
|
|
@ -12,6 +12,12 @@
|
||||||
\set Table_Part_01 lineitem_range_complex_part_01
|
\set Table_Part_01 lineitem_range_complex_part_01
|
||||||
\set Table_Part_02 lineitem_range_complex_part_02
|
\set Table_Part_02 lineitem_range_complex_part_02
|
||||||
\set Table_Part_03 lineitem_range_complex_part_03
|
\set Table_Part_03 lineitem_range_complex_part_03
|
||||||
|
SELECT usesysid AS userid FROM pg_user WHERE usename = current_user \gset
|
||||||
|
\set File_Basedir base/pgsql_job_cache
|
||||||
|
\set Table_File_00 :File_Basedir/job_:JobId/task_:TaskId/p_00000.:userid
|
||||||
|
\set Table_File_01 :File_Basedir/job_:JobId/task_:TaskId/p_00001.:userid
|
||||||
|
\set Table_File_02 :File_Basedir/job_:JobId/task_:TaskId/p_00002.:userid
|
||||||
|
\set Table_File_03 :File_Basedir/job_:JobId/task_:TaskId/p_00003.:userid
|
||||||
-- Run hardcoded complex select query, and apply range partitioning on query
|
-- Run hardcoded complex select query, and apply range partitioning on query
|
||||||
-- results
|
-- results
|
||||||
SELECT worker_range_partition_table(:JobId, :TaskId,
|
SELECT worker_range_partition_table(:JobId, :TaskId,
|
||||||
|
@ -27,10 +33,10 @@ SELECT worker_range_partition_table(:JobId, :TaskId,
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- Copy partitioned data files into tables for testing purposes
|
-- Copy partitioned data files into tables for testing purposes
|
||||||
COPY :Table_Part_00 FROM 'base/pgsql_job_cache/job_201010/task_101102/p_00000';
|
COPY :Table_Part_00 FROM :'Table_File_00';
|
||||||
COPY :Table_Part_01 FROM 'base/pgsql_job_cache/job_201010/task_101102/p_00001';
|
COPY :Table_Part_01 FROM :'Table_File_01';
|
||||||
COPY :Table_Part_02 FROM 'base/pgsql_job_cache/job_201010/task_101102/p_00002';
|
COPY :Table_Part_02 FROM :'Table_File_02';
|
||||||
COPY :Table_Part_03 FROM 'base/pgsql_job_cache/job_201010/task_101102/p_00003';
|
COPY :Table_Part_03 FROM :'Table_File_03';
|
||||||
SELECT COUNT(*) FROM :Table_Part_00;
|
SELECT COUNT(*) FROM :Table_Part_00;
|
||||||
count
|
count
|
||||||
-------
|
-------
|
||||||
|
|
|
@ -14,6 +14,13 @@
|
||||||
\set TablePart01 lineitem_partition_task_part_01
|
\set TablePart01 lineitem_partition_task_part_01
|
||||||
\set TablePart02 lineitem_partition_task_part_02
|
\set TablePart02 lineitem_partition_task_part_02
|
||||||
|
|
||||||
|
SELECT usesysid AS userid FROM pg_user WHERE usename = current_user \gset
|
||||||
|
|
||||||
|
\set File_Basedir base/pgsql_job_cache
|
||||||
|
\set Table_File_00 :File_Basedir/job_:JobId/task_:PartitionTaskId/p_00000.:userid
|
||||||
|
\set Table_File_01 :File_Basedir/job_:JobId/task_:PartitionTaskId/p_00001.:userid
|
||||||
|
\set Table_File_02 :File_Basedir/job_:JobId/task_:PartitionTaskId/p_00002.:userid
|
||||||
|
|
||||||
-- We assign a partition task and wait for it to complete. Note that we hardcode
|
-- We assign a partition task and wait for it to complete. Note that we hardcode
|
||||||
-- the partition function call string, including the job and task identifiers,
|
-- the partition function call string, including the job and task identifiers,
|
||||||
-- into the argument in the task assignment function. This hardcoding is
|
-- into the argument in the task assignment function. This hardcoding is
|
||||||
|
@ -29,9 +36,9 @@ SELECT pg_sleep(4.0);
|
||||||
|
|
||||||
SELECT task_tracker_task_status(:JobId, :PartitionTaskId);
|
SELECT task_tracker_task_status(:JobId, :PartitionTaskId);
|
||||||
|
|
||||||
COPY :TablePart00 FROM 'base/pgsql_job_cache/job_401010/task_801106/p_00000';
|
COPY :TablePart00 FROM :'Table_File_00';
|
||||||
COPY :TablePart01 FROM 'base/pgsql_job_cache/job_401010/task_801106/p_00001';
|
COPY :TablePart01 FROM :'Table_File_01';
|
||||||
COPY :TablePart02 FROM 'base/pgsql_job_cache/job_401010/task_801106/p_00002';
|
COPY :TablePart02 FROM :'Table_File_02';
|
||||||
|
|
||||||
SELECT COUNT(*) FROM :TablePart00;
|
SELECT COUNT(*) FROM :TablePart00;
|
||||||
SELECT COUNT(*) FROM :TablePart02;
|
SELECT COUNT(*) FROM :TablePart02;
|
||||||
|
|
|
@ -18,6 +18,13 @@
|
||||||
\set Table_Part_01 binary_data_table_part_01
|
\set Table_Part_01 binary_data_table_part_01
|
||||||
\set Table_Part_02 binary_data_table_part_02
|
\set Table_Part_02 binary_data_table_part_02
|
||||||
|
|
||||||
|
SELECT usesysid AS userid FROM pg_user WHERE usename = current_user \gset
|
||||||
|
|
||||||
|
\set File_Basedir base/pgsql_job_cache
|
||||||
|
\set Table_File_00 :File_Basedir/job_:JobId/task_:TaskId/p_00000.:userid
|
||||||
|
\set Table_File_01 :File_Basedir/job_:JobId/task_:TaskId/p_00001.:userid
|
||||||
|
\set Table_File_02 :File_Basedir/job_:JobId/task_:TaskId/p_00002.:userid
|
||||||
|
|
||||||
-- Create table with special characters
|
-- Create table with special characters
|
||||||
|
|
||||||
CREATE TABLE :Table_Name(textcolumn text, binarycolumn bytea);
|
CREATE TABLE :Table_Name(textcolumn text, binarycolumn bytea);
|
||||||
|
@ -52,9 +59,9 @@ CREATE TABLE :Table_Part_00 ( LIKE :Table_Name );
|
||||||
CREATE TABLE :Table_Part_01 ( LIKE :Table_Name );
|
CREATE TABLE :Table_Part_01 ( LIKE :Table_Name );
|
||||||
CREATE TABLE :Table_Part_02 ( LIKE :Table_Name );
|
CREATE TABLE :Table_Part_02 ( LIKE :Table_Name );
|
||||||
|
|
||||||
COPY :Table_Part_00 FROM 'base/pgsql_job_cache/job_201010/task_101105/p_00000';
|
COPY :Table_Part_00 FROM :'Table_File_00';
|
||||||
COPY :Table_Part_01 FROM 'base/pgsql_job_cache/job_201010/task_101105/p_00001';
|
COPY :Table_Part_01 FROM :'Table_File_01';
|
||||||
COPY :Table_Part_02 FROM 'base/pgsql_job_cache/job_201010/task_101105/p_00002';
|
COPY :Table_Part_02 FROM :'Table_File_02';
|
||||||
|
|
||||||
-- The union of the three partitions should have as many rows as original table
|
-- The union of the three partitions should have as many rows as original table
|
||||||
|
|
||||||
|
|
|
@ -22,16 +22,24 @@
|
||||||
\set Table_Part_02 lineitem_hash_part_02
|
\set Table_Part_02 lineitem_hash_part_02
|
||||||
\set Table_Part_03 lineitem_hash_part_03
|
\set Table_Part_03 lineitem_hash_part_03
|
||||||
|
|
||||||
|
SELECT usesysid AS userid FROM pg_user WHERE usename = current_user \gset
|
||||||
|
|
||||||
|
\set File_Basedir base/pgsql_job_cache
|
||||||
|
\set Table_File_00 :File_Basedir/job_:JobId/task_:TaskId/p_00000.:userid
|
||||||
|
\set Table_File_01 :File_Basedir/job_:JobId/task_:TaskId/p_00001.:userid
|
||||||
|
\set Table_File_02 :File_Basedir/job_:JobId/task_:TaskId/p_00002.:userid
|
||||||
|
\set Table_File_03 :File_Basedir/job_:JobId/task_:TaskId/p_00003.:userid
|
||||||
|
|
||||||
-- Run select query, and apply hash partitioning on query results
|
-- Run select query, and apply hash partitioning on query results
|
||||||
|
|
||||||
SELECT worker_hash_partition_table(:JobId, :TaskId, :Select_Query_Text,
|
SELECT worker_hash_partition_table(:JobId, :TaskId, :Select_Query_Text,
|
||||||
:Partition_Column_Text, :Partition_Column_Type::regtype,
|
:Partition_Column_Text, :Partition_Column_Type::regtype,
|
||||||
ARRAY[-2147483648, -1073741824, 0, 1073741824]::int4[]);
|
ARRAY[-2147483648, -1073741824, 0, 1073741824]::int4[]);
|
||||||
|
|
||||||
COPY :Table_Part_00 FROM 'base/pgsql_job_cache/job_201010/task_101103/p_00000';
|
COPY :Table_Part_00 FROM :'Table_File_00';
|
||||||
COPY :Table_Part_01 FROM 'base/pgsql_job_cache/job_201010/task_101103/p_00001';
|
COPY :Table_Part_01 FROM :'Table_File_01';
|
||||||
COPY :Table_Part_02 FROM 'base/pgsql_job_cache/job_201010/task_101103/p_00002';
|
COPY :Table_Part_02 FROM :'Table_File_02';
|
||||||
COPY :Table_Part_03 FROM 'base/pgsql_job_cache/job_201010/task_101103/p_00003';
|
COPY :Table_Part_03 FROM :'Table_File_03';
|
||||||
|
|
||||||
SELECT COUNT(*) FROM :Table_Part_00;
|
SELECT COUNT(*) FROM :Table_Part_00;
|
||||||
SELECT COUNT(*) FROM :Table_Part_01;
|
SELECT COUNT(*) FROM :Table_Part_01;
|
||||||
|
|
|
@ -22,6 +22,14 @@
|
||||||
\set Table_Part_02 lineitem_hash_complex_part_02
|
\set Table_Part_02 lineitem_hash_complex_part_02
|
||||||
\set Table_Part_03 lineitem_hash_complex_part_03
|
\set Table_Part_03 lineitem_hash_complex_part_03
|
||||||
|
|
||||||
|
SELECT usesysid AS userid FROM pg_user WHERE usename = current_user \gset
|
||||||
|
|
||||||
|
\set File_Basedir base/pgsql_job_cache
|
||||||
|
\set Table_File_00 :File_Basedir/job_:JobId/task_:TaskId/p_00000.:userid
|
||||||
|
\set Table_File_01 :File_Basedir/job_:JobId/task_:TaskId/p_00001.:userid
|
||||||
|
\set Table_File_02 :File_Basedir/job_:JobId/task_:TaskId/p_00002.:userid
|
||||||
|
\set Table_File_03 :File_Basedir/job_:JobId/task_:TaskId/p_00003.:userid
|
||||||
|
|
||||||
-- Run hardcoded complex select query, and apply hash partitioning on query
|
-- Run hardcoded complex select query, and apply hash partitioning on query
|
||||||
-- results
|
-- results
|
||||||
|
|
||||||
|
@ -35,10 +43,10 @@ SELECT worker_hash_partition_table(:JobId, :TaskId,
|
||||||
|
|
||||||
-- Copy partitioned data files into tables for testing purposes
|
-- Copy partitioned data files into tables for testing purposes
|
||||||
|
|
||||||
COPY :Table_Part_00 FROM 'base/pgsql_job_cache/job_201010/task_101104/p_00000';
|
COPY :Table_Part_00 FROM :'Table_File_00';
|
||||||
COPY :Table_Part_01 FROM 'base/pgsql_job_cache/job_201010/task_101104/p_00001';
|
COPY :Table_Part_01 FROM :'Table_File_01';
|
||||||
COPY :Table_Part_02 FROM 'base/pgsql_job_cache/job_201010/task_101104/p_00002';
|
COPY :Table_Part_02 FROM :'Table_File_02';
|
||||||
COPY :Table_Part_03 FROM 'base/pgsql_job_cache/job_201010/task_101104/p_00003';
|
COPY :Table_Part_03 FROM :'Table_File_03';
|
||||||
|
|
||||||
SELECT COUNT(*) FROM :Table_Part_00;
|
SELECT COUNT(*) FROM :Table_Part_00;
|
||||||
SELECT COUNT(*) FROM :Table_Part_03;
|
SELECT COUNT(*) FROM :Table_Part_03;
|
||||||
|
|
|
@ -17,6 +17,13 @@
|
||||||
\set Range_Table_Part_01 supplier_range_part_01
|
\set Range_Table_Part_01 supplier_range_part_01
|
||||||
\set Range_Table_Part_02 supplier_range_part_02
|
\set Range_Table_Part_02 supplier_range_part_02
|
||||||
|
|
||||||
|
SELECT usesysid AS userid FROM pg_user WHERE usename = current_user \gset
|
||||||
|
|
||||||
|
\set File_Basedir base/pgsql_job_cache
|
||||||
|
\set Range_Table_File_00 :File_Basedir/job_:JobId/task_:Range_TaskId/p_00000.:userid
|
||||||
|
\set Range_Table_File_01 :File_Basedir/job_:JobId/task_:Range_TaskId/p_00001.:userid
|
||||||
|
\set Range_Table_File_02 :File_Basedir/job_:JobId/task_:Range_TaskId/p_00002.:userid
|
||||||
|
|
||||||
-- Run select query, and apply range partitioning on query results. Note that
|
-- Run select query, and apply range partitioning on query results. Note that
|
||||||
-- one of the split point values is 0, We are checking here that the partition
|
-- one of the split point values is 0, We are checking here that the partition
|
||||||
-- function doesn't treat 0 as null, and that range repartitioning correctly
|
-- function doesn't treat 0 as null, and that range repartitioning correctly
|
||||||
|
@ -28,9 +35,9 @@ SELECT worker_range_partition_table(:JobId, :Range_TaskId, :Select_Query_Text,
|
||||||
|
|
||||||
-- Copy partitioned data files into tables for testing purposes
|
-- Copy partitioned data files into tables for testing purposes
|
||||||
|
|
||||||
COPY :Range_Table_Part_00 FROM 'base/pgsql_job_cache/job_201010/task_101106/p_00000';
|
COPY :Range_Table_Part_00 FROM :'Range_Table_File_00';
|
||||||
COPY :Range_Table_Part_01 FROM 'base/pgsql_job_cache/job_201010/task_101106/p_00001';
|
COPY :Range_Table_Part_01 FROM :'Range_Table_File_01';
|
||||||
COPY :Range_Table_Part_02 FROM 'base/pgsql_job_cache/job_201010/task_101106/p_00002';
|
COPY :Range_Table_Part_02 FROM :'Range_Table_File_02';
|
||||||
|
|
||||||
SELECT COUNT(*) FROM :Range_Table_Part_00;
|
SELECT COUNT(*) FROM :Range_Table_Part_00;
|
||||||
SELECT COUNT(*) FROM :Range_Table_Part_02;
|
SELECT COUNT(*) FROM :Range_Table_Part_02;
|
||||||
|
@ -76,15 +83,20 @@ SELECT COUNT(*) AS diff_rhs_02 FROM (
|
||||||
\set Hash_Table_Part_01 supplier_hash_part_01
|
\set Hash_Table_Part_01 supplier_hash_part_01
|
||||||
\set Hash_Table_Part_02 supplier_hash_part_02
|
\set Hash_Table_Part_02 supplier_hash_part_02
|
||||||
|
|
||||||
|
\set File_Basedir base/pgsql_job_cache
|
||||||
|
\set Hash_Table_File_00 :File_Basedir/job_:JobId/task_:Hash_TaskId/p_00000.:userid
|
||||||
|
\set Hash_Table_File_01 :File_Basedir/job_:JobId/task_:Hash_TaskId/p_00001.:userid
|
||||||
|
\set Hash_Table_File_02 :File_Basedir/job_:JobId/task_:Hash_TaskId/p_00002.:userid
|
||||||
|
|
||||||
-- Run select query, and apply hash partitioning on query results
|
-- Run select query, and apply hash partitioning on query results
|
||||||
|
|
||||||
SELECT worker_hash_partition_table(:JobId, :Hash_TaskId, :Select_Query_Text,
|
SELECT worker_hash_partition_table(:JobId, :Hash_TaskId, :Select_Query_Text,
|
||||||
:Partition_Column_Text, :Partition_Column_Type,
|
:Partition_Column_Text, :Partition_Column_Type,
|
||||||
ARRAY[-2147483648, -1073741824, 0, 1073741824]::int4[]);
|
ARRAY[-2147483648, -1073741824, 0, 1073741824]::int4[]);
|
||||||
|
|
||||||
COPY :Hash_Table_Part_00 FROM 'base/pgsql_job_cache/job_201010/task_101107/p_00000';
|
COPY :Hash_Table_Part_00 FROM :'Hash_Table_File_00';
|
||||||
COPY :Hash_Table_Part_01 FROM 'base/pgsql_job_cache/job_201010/task_101107/p_00001';
|
COPY :Hash_Table_Part_01 FROM :'Hash_Table_File_01';
|
||||||
COPY :Hash_Table_Part_02 FROM 'base/pgsql_job_cache/job_201010/task_101107/p_00002';
|
COPY :Hash_Table_Part_02 FROM :'Hash_Table_File_02';
|
||||||
|
|
||||||
SELECT COUNT(*) FROM :Hash_Table_Part_00;
|
SELECT COUNT(*) FROM :Hash_Table_Part_00;
|
||||||
SELECT COUNT(*) FROM :Hash_Table_Part_02;
|
SELECT COUNT(*) FROM :Hash_Table_Part_02;
|
||||||
|
|
|
@ -18,11 +18,13 @@
|
||||||
\set Table_Part_02 lineitem_range_part_02
|
\set Table_Part_02 lineitem_range_part_02
|
||||||
\set Table_Part_03 lineitem_range_part_03
|
\set Table_Part_03 lineitem_range_part_03
|
||||||
|
|
||||||
|
SELECT usesysid AS userid FROM pg_user WHERE usename = current_user \gset
|
||||||
|
|
||||||
\set File_Basedir base/pgsql_job_cache
|
\set File_Basedir base/pgsql_job_cache
|
||||||
\set Table_File_00 :File_Basedir/job_:JobId/task_:TaskId/p_00000
|
\set Table_File_00 :File_Basedir/job_:JobId/task_:TaskId/p_00000.:userid
|
||||||
\set Table_File_01 :File_Basedir/job_:JobId/task_:TaskId/p_00001
|
\set Table_File_01 :File_Basedir/job_:JobId/task_:TaskId/p_00001.:userid
|
||||||
\set Table_File_02 :File_Basedir/job_:JobId/task_:TaskId/p_00002
|
\set Table_File_02 :File_Basedir/job_:JobId/task_:TaskId/p_00002.:userid
|
||||||
\set Table_File_03 :File_Basedir/job_:JobId/task_:TaskId/p_00003
|
\set Table_File_03 :File_Basedir/job_:JobId/task_:TaskId/p_00003.:userid
|
||||||
|
|
||||||
-- Run select query, and apply range partitioning on query results
|
-- Run select query, and apply range partitioning on query results
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,14 @@
|
||||||
\set Table_Part_02 lineitem_range_complex_part_02
|
\set Table_Part_02 lineitem_range_complex_part_02
|
||||||
\set Table_Part_03 lineitem_range_complex_part_03
|
\set Table_Part_03 lineitem_range_complex_part_03
|
||||||
|
|
||||||
|
SELECT usesysid AS userid FROM pg_user WHERE usename = current_user \gset
|
||||||
|
|
||||||
|
\set File_Basedir base/pgsql_job_cache
|
||||||
|
\set Table_File_00 :File_Basedir/job_:JobId/task_:TaskId/p_00000.:userid
|
||||||
|
\set Table_File_01 :File_Basedir/job_:JobId/task_:TaskId/p_00001.:userid
|
||||||
|
\set Table_File_02 :File_Basedir/job_:JobId/task_:TaskId/p_00002.:userid
|
||||||
|
\set Table_File_03 :File_Basedir/job_:JobId/task_:TaskId/p_00003.:userid
|
||||||
|
|
||||||
-- Run hardcoded complex select query, and apply range partitioning on query
|
-- Run hardcoded complex select query, and apply range partitioning on query
|
||||||
-- results
|
-- results
|
||||||
|
|
||||||
|
@ -31,10 +39,10 @@ SELECT worker_range_partition_table(:JobId, :TaskId,
|
||||||
|
|
||||||
-- Copy partitioned data files into tables for testing purposes
|
-- Copy partitioned data files into tables for testing purposes
|
||||||
|
|
||||||
COPY :Table_Part_00 FROM 'base/pgsql_job_cache/job_201010/task_101102/p_00000';
|
COPY :Table_Part_00 FROM :'Table_File_00';
|
||||||
COPY :Table_Part_01 FROM 'base/pgsql_job_cache/job_201010/task_101102/p_00001';
|
COPY :Table_Part_01 FROM :'Table_File_01';
|
||||||
COPY :Table_Part_02 FROM 'base/pgsql_job_cache/job_201010/task_101102/p_00002';
|
COPY :Table_Part_02 FROM :'Table_File_02';
|
||||||
COPY :Table_Part_03 FROM 'base/pgsql_job_cache/job_201010/task_101102/p_00003';
|
COPY :Table_Part_03 FROM :'Table_File_03';
|
||||||
|
|
||||||
SELECT COUNT(*) FROM :Table_Part_00;
|
SELECT COUNT(*) FROM :Table_Part_00;
|
||||||
SELECT COUNT(*) FROM :Table_Part_03;
|
SELECT COUNT(*) FROM :Table_Part_03;
|
||||||
|
|
Loading…
Reference in New Issue