-
Notifications
You must be signed in to change notification settings - Fork 753
Closed
Milestone
Description
Here are the steps to re-produce the error:
CREATE SCHEMA tpch_1;
SET search_path TO public;
CREATE TYPE tpch_1.new_composite_type as (key1 text, key2 text);
CREATE TABLE tpch_1.nation_hash (
n_nationkey integer not null,
n_name char(25) not null,
n_regionkey integer not null,
n_comment varchar(152),
test_col tpch_1.new_composite_type
);
SELECT master_create_distributed_table('tpch_1.nation_hash', 'n_nationkey', 'hash');
SELECT master_create_worker_shards('tpch_1.nation_hash', 4, 2);
\COPY tpch_1.nation_hash FROM STDIN WITH CSV
1,'name',1,'comment_1',"(a,a)"
2,'name',2,'comment_2',"(a,b)"
3,'name',3,'comment_3',"(a,c)"
4,'name',4,'comment_4',"(a,d)"
5,'name',5,'comment_5',"(a,e)"
-- works fine
SELECT * FROM tpch_1.nation_hash WHERE test_col = '(a,a)'::tpch_1.new_composite_type;
n_nationkey | n_name | n_regionkey | n_comment | test_col
-------------+---------------------------+-------------+-------------+----------
1 | 'name' | 1 | 'comment_1' | (a,a)
1 | 'name' | 1 | 'comment_1' | (a,a)
1 | 'name' | 1 | 'comment_1' | (a,a)
(3 rows)
SET search_path TO tpch_1;
\COPY nation_hash FROM STDIN WITH CSV
1,'name',1,'comment_1',"(a,a)"
2,'name',2,'comment_2',"(a,b)"
3,'name',3,'comment_3',"(a,c)"
4,'name',4,'comment_4',"(a,d)"
5,'name',5,'comment_5',"(a,e)"
-- oops cannot add the type info
SELECT * FROM nation_hash WHERE test_col = '(a,a)'::new_composite_type;
WARNING: could not receive query results from localhost:9700
DETAIL: Client error: type "new_composite_type" does not exist
-- worker log
ERROR: type "new_composite_type" does not exist at character 138
STATEMENT: COPY (SELECT n_nationkey, n_name, n_regionkey, n_comment, test_col FROM tpch_1.nation_hash_102009 nation_hash WHERE (test_col = '(a,a)'::new_composite_type)) TO STDOUTI haven't looked into the detail but similar to 267 and 556, we should add the schema information about the composite type while deparsing the query.
The owner of this task should also ensure that the fix works for router planner as well.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels