citus icon indicating copy to clipboard operation
citus copied to clipboard

Misleading router executor error with complex subqueries

Open naisila opened this issue 4 years ago • 2 comments

Problem

Hitting cannot handle complex subqueries when the router executor is disabled error when the router executor is enabled

Steps to reproduce:

CREATE TABLE table_1 (id int, t1 int);
SELECT create_distributed_table('table_1', 'id');

CREATE TABLE table_2 (id serial, t2 int);
SELECT create_distributed_table('table_2', 'id');

-- insert-select query with complex subquery errors out
WITH top10 AS ( SELECT id FROM table_1 WHERE t1 IS NOT NULL ORDER BY t1 LIMIT 10 )
INSERT INTO table_2 (t2) SELECT * FROM top10;
ERROR:  cannot handle complex subqueries when the router executor is disabled

-- however router executor is enabled
SHOW citus.enable_router_execution;
 citus.enable_router_execution
-------------------------------
 on
(1 row)

This is even part of our tests right now. For reference https://github.com/citusdata/citus/pull/4914/files#r642292926

naisila avatar Oct 29 '21 19:10 naisila

What would be steps to debug real issue with this ? My issue was closed but no solution is given/ no alternative and no root cause.

CamiloHerreraDR avatar Sep 21 '22 16:09 CamiloHerreraDR

Hi @CamiloHerreraDR This seems to be a mistake on my part. Let me look further into both these issues which I might have incorrectly marked as duplicates, I will update this comment.

Edit: I reopened the other issue for further investigation. Apologies for my confusion.

naisila avatar Sep 22 '22 08:09 naisila

Fixed by #6059

naisila avatar Sep 28 '22 12:09 naisila