-- Tests that check that our query functionality behaves as expected when the -- table schema is modified via ALTER statements. ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 620000; SELECT count(*) FROM customer; count ------- 1000 (1 row) SELECT * FROM customer LIMIT 2; c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | c_mktsegment | c_comment -----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+----------------------------------------------------------------- 1 | Customer#000000001 | IVhzIApeRb ot,c,E | 15 | 25-989-741-2988 | 711.56 | BUILDING | to the even, regular platelets. regular, ironic epitaphs nag e 2 | Customer#000000002 | XSTf4,NCwDVaWNe6tEgvwfmRchLXak | 13 | 23-768-687-3665 | 121.65 | AUTOMOBILE | l accounts. blithely ironic theodolites integrate boldly: caref (2 rows) ALTER TABLE customer ADD COLUMN new_column1 INTEGER; 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 customer ADD COLUMN new_column2 INTEGER; SELECT count(*) FROM customer; count ------- 1000 (1 row) SELECT * FROM customer LIMIT 2; c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | c_mktsegment | c_comment | new_column1 | new_column2 -----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+-----------------------------------------------------------------+-------------+------------- 1 | Customer#000000001 | IVhzIApeRb ot,c,E | 15 | 25-989-741-2988 | 711.56 | BUILDING | to the even, regular platelets. regular, ironic epitaphs nag e | | 2 | Customer#000000002 | XSTf4,NCwDVaWNe6tEgvwfmRchLXak | 13 | 23-768-687-3665 | 121.65 | AUTOMOBILE | l accounts. blithely ironic theodolites integrate boldly: caref | | (2 rows) ALTER TABLE customer DROP COLUMN new_column1; ALTER TABLE customer DROP COLUMN new_column2; SELECT count(*) FROM customer; count ------- 1000 (1 row) SELECT * FROM customer LIMIT 2; c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | c_mktsegment | c_comment -----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+----------------------------------------------------------------- 1 | Customer#000000001 | IVhzIApeRb ot,c,E | 15 | 25-989-741-2988 | 711.56 | BUILDING | to the even, regular platelets. regular, ironic epitaphs nag e 2 | Customer#000000002 | XSTf4,NCwDVaWNe6tEgvwfmRchLXak | 13 | 23-768-687-3665 | 121.65 | AUTOMOBILE | l accounts. blithely ironic theodolites integrate boldly: caref (2 rows) -- Verify joins work with dropped columns. SELECT count(*) FROM customer, orders WHERE c_custkey = o_custkey; count ------- 1955 (1 row) -- Test joinExpr aliases by performing an outer-join. This code path is -- currently not exercised, but we are adding this test to catch this bug when -- we start supporting outer joins. SELECT c_custkey FROM (customer LEFT OUTER JOIN orders ON (c_custkey = o_custkey)) AS test(c_custkey, c_nationkey) INNER JOIN lineitem ON (test.c_custkey = l_orderkey) LIMIT 10; ERROR: cannot run outer join query if join is not on the partition column DETAIL: Outer joins requiring repartitioning are not supported.