Issue found by SQLSmith on git commit hash dd9e6 using seed 62001520.
To Reproduce
create table all_types as select * exclude(small_enum, medium_enum, large_enum) from test_all_types() limit 0;
SELECT EXISTS(SELECT ref_2.timestamp_s AS c0, ref_2.utinyint AS c2 FROM main.all_types WHERE EXISTS(SELECT subq_0.c2 AS c0, subq_0.c0 AS c1, NULL, subq_0.c1 AS c3 WHERE (NULL ~~~ (SELECT "varchar")))) FROM (SELECT ref_0.fixed_struct_array AS c0, ref_0."float" AS c1, ref_0."bigint" AS c2 FROM main.all_types AS ref_0 WHERE EXISTS(SELECT ref_1."smallint" AS c0, ref_0.nested_int_array AS c1, ref_0.ubigint AS c2, ref_0.uint AS c3, ref_0."timestamp" AS c4, (SELECT tinyint FROM main.all_types LIMIT 1 OFFSET 6) AS c5 FROM main.all_types AS ref_1 WHERE (1 OR 1) LIMIT 116) LIMIT 113) AS subq_0 INNER JOIN main.all_types AS ref_2 ON ((subq_0.c0 IS NULL)) WHERE (SELECT NULL FROM main.all_types LIMIT 1 OFFSET 3) LIMIT 136
Error Message
ABORT THROWN BY INTERNAL EXCEPTION: Failed to bind column reference "varchar" [43.4] (bindings: {#[65.0], #[65.1], #[65.2], #[65.3], #[65.4]})
Issue found by SQLSmith on git commit hash dd9e6 using seed 62001520.
To Reproduce
Error Message