Issue found by SQLSmith on git commit hash dd9e6 using seed 372033452.
To Reproduce
create table all_types as select * exclude(small_enum, medium_enum, large_enum) from test_all_types();
SELECT NULL FROM (SELECT ref_1.usmallint AS c0, ref_1.dec38_10 AS c1, ref_0.utinyint AS c2, ref_1.usmallint AS c3, ref_1.timestamp_tz AS c4, ref_0."varchar" AS c5, ref_0.fixed_struct_array AS c6, ref_1.utinyint AS c7, ref_0.struct_of_fixed_array AS c8, ref_1."map" AS c9 FROM main.all_types AS ref_0 INNER JOIN main.all_types AS ref_1 ON (EXISTS(SELECT ref_1."interval" AS c0, ref_0.date AS c1 FROM main.all_types AS ref_2 WHERE EXISTS(SELECT ref_0.date AS c0, ref_2."union" AS c1, ref_2.uint AS c2, ref_0."smallint" AS c3 FROM main.all_types AS ref_3 WHERE (0 AND (ref_0."varchar" ~~* ref_3."varchar"))))) WHERE (ref_0."varchar" !~~ ref_0."varchar") LIMIT 34) AS subq_0 LEFT JOIN main.all_types AS ref_4 ON ((subq_0.c5 ~~ ref_4."varchar")) WHERE ((SELECT NULL) AND EXISTS(SELECT (SELECT NULL) AS c3 FROM main.all_types INNER JOIN main.all_types AS ref_6 INNER JOIN main.all_types AS ref_7 ON (((SELECT NULL) AND (SELECT NULL FROM main.all_types LIMIT 1 OFFSET 4))) ON ((34 IS NOT NULL)) LIMIT 114)) LIMIT 50
Error Message
ABORT THROWN BY INTERNAL EXCEPTION: Failed to bind column reference "c1" [10.6] (bindings: {#[67.0], #[67.1], #[67.2], #[67.3]})
Issue found by SQLSmith on git commit hash dd9e6 using seed 372033452.
To Reproduce
Error Message