Feature Request
there is something wrong when binding correlated subqueries because parent context is ignored.
explain select a,b from t where a in (select a from t1 where a > t.a);
ERROR: invalid table: t
After fix this bug, we may have the plan like this:
PLAN
------------------------------------------------------------------
Projection [t.a, t.b] [Project] +
LeftSemi Join On t.a = (t1.a) as (_temp_table_0_.a) [HashJoin]+
Scan t -> [a, b] [SeqScan] +
Projection [(t1.a) as (_temp_table_0_.a)] [Project] +
Projection [t1.a] [Project] +
Filter (t1.a > t.a), Is Having: false [Filter] +
Scan t1 -> [a] [SeqScan]
Filter (t1.a > t.a) can't be handle correctly because it doesn't have the data of t. So we need to pull up this filter.
Maybe we could pull up all filters, and then push them down. so the things we should do next is here:
Feature Request
there is something wrong when binding correlated subqueries because parent context is ignored.
After fix this bug, we may have the plan like this:
Filter (t1.a > t.a)can't be handle correctly because it doesn't have the data oft. So we need to pull up this filter.Maybe we could pull up all filters, and then push them down. so the things we should do next is here:
https://github.com/KipData/FnckSQL/pull/191#252