Issue found by SQLSmith on git commit hash 10ea4 using seed 219488188.
To Reproduce
create table all_types as select * exclude(small_enum, medium_enum, large_enum) from test_all_types() limit 0;
SELECT 44 AS c2 FROM (SELECT ref_0.dec_4_1 AS c0, ref_0.ubigint AS c1, 94 AS c2, ref_0.utinyint AS c3, ref_0.fixed_nested_int_array AS c4 FROM main.all_types AS ref_0 WHERE 1 LIMIT 48) AS subq_0 WHERE EXISTS(SELECT EXISTS(SELECT NULL FROM main.all_types AS ref_2 WHERE EXISTS(SELECT NULL WHERE ref_2."varchar")) WHERE EXISTS(SELECT ref_5.usmallint AS c0, subq_0.c3 AS c1 FROM main.all_types AS ref_5 WHERE ((ref_5."varchar" ~~ ref_5."varchar") OR (ref_5."varchar" ~~~ ref_5."varchar") OR (subq_0.c0 IS NULL))) LIMIT 190)
Error Message
ABORT THROWN BY INTERNAL EXCEPTION: Expression with depth > 1 detected in non-lateral join
Issue found by SQLSmith on git commit hash 10ea4 using seed 219488188.
To Reproduce
Error Message