-- Copyright (c) Microsoft Corporation. -- Licensed under the PostgreSQL License. -- Test: Parallel execution with df.join() and & operator SET ROLE df_regress_user; DROP TABLE IF EXISTS test_parallel_log; NOTICE: table "test_parallel_log" does not exist, skipping CREATE TABLE test_parallel_log (id SERIAL, branch TEXT, variant TEXT); -- Test A: df.join() function SELECT df.start( df.join( 'INSERT INTO test_parallel_log (branch, variant) VALUES (''A'', ''func'')', 'INSERT INTO test_parallel_log (branch, variant) VALUES (''B'', ''func'')' ), 'test-parallel-func' ) AS instance_id \gset SELECT df.await_instance(:'instance_id') AS status; status ----------- completed (1 row) -- Test B: & operator SELECT df.start( 'INSERT INTO test_parallel_log (branch, variant) VALUES (''A'', ''op'')' & 'INSERT INTO test_parallel_log (branch, variant) VALUES (''B'', ''op'')', 'test-parallel-op' ) AS instance_id \gset SELECT df.await_instance(:'instance_id') AS status; status ----------- completed (1 row) -- Verify results (deterministic output, ordered by branch then variant) -- Both branches should have executed SELECT branch, variant FROM test_parallel_log ORDER BY variant, branch; branch | variant --------+--------- A | func B | func A | op B | op (4 rows) -- Cleanup DROP TABLE test_parallel_log;