mirror of https://github.com/citusdata/citus.git
This code is not needed anymore since #3668 was merged. It's actually causing some issues when using the binary Postgres protocol, because postgres thinks it gets a `bigint` from the worker, but actually gets an normal `int`. The query in question that fails is this: ```sql CREATE TABLE test_table_1(id int, val1 int); CREATE TABLE test_table_2(id int, val1 bigint); SELECT create_distributed_table('test_table_1', 'id'); SELECT create_distributed_table('test_table_2', 'id'); INSERT INTO test_table_1 VALUES(1,1),(2,2),(3,3); INSERT INTO test_table_2 VALUES(1,1),(3,3),(4,5); SELECT val1 FROM test_table_1 LEFT JOIN test_table_2 USING(id, val1) ORDER BY 1; ``` The difference in queries that is sent to the workers after this change is this, for this query: ```diff --- query_old.sql 2020-06-09 09:51:21.460000000 +0200 +++ query_new.sql 2020-06-09 09:51:39.500000000 +0200 @@ -1 +1 @@ -SELECT worker_column_1 AS val1 FROM (SELECT test_table_1.val1 AS worker_column_1 FROM (public.test_table_1_102015 test_table_1(id, val1) LEFT JOIN public.test_table_2_102019 test_table_2(id, val1) USING (id, val1))) worker_subquery +SELECT worker_column_1 AS val1 FROM (SELECT val1 AS worker_column_1 FROM (public.test_table_1_102015 test_table_1(id, val1) LEFT JOIN public.test_table_2_102019 test_table_2(id, val1) USING (id, val1))) worker_subquery ``` |
||
---|---|---|
.. | ||
backend | ||
include | ||
test |