sql->whit tmp_auth as (select node_id, node_type from xxx.xxx.organization where status = '1' and node_type <> '0')
select t1.id, t2.name from xxx.xxx.test1 t1 left jon xxx.xxx.test2 t2 on t1.id = t2.o_id and t1.s_id in (select node_id from tmp_auth where node_id = 1) limit 10;
error message -> Column 't1.s_id' cannot be resolved
Can you show the schema of the test1 table? You can run DESCRIBE test1 to do so.
whit tmp_auth as (select node_id, node_type from xxx.xxx.organization where status = '1' and node_type <> '0')
select t1.id, t2.name from xxx.xxx.test1 t1 left jon xxx.xxx.test2 t2 on t1.id = t2.o_id and t1.s_id in (‘1’, ‘2’) limit 10;
That's ok, column 's_id' exists in the table
I was able to reproduce the issue with this query:
WITH
t(x, y) AS (VALUES (1, 10), (2, 20)),
u(x) AS (VALUES 1, 2),
w(z) AS (VALUES 10, 20)
SELECT *
FROM t LEFT JOIN u ON t.x = u.x AND t.y IN (SELECT z FROM w);
Thanks for reporting this issue! The fix will be available in the next version (339).
Most helpful comment
Thanks for reporting this issue! The fix will be available in the next version (339).