You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The implementation rule API is likely pretty simple, so we should aim to stabilize that quickly.
On the other hand, we should make sure the transformation rule API makes sense. Returning a Vec<LogicalExpression> doesn't really make sense because transformation rules really emit a whole bunch of things including logical expressions, groups, and scalars.
However, we also don't want to just return a single PartialLogicalPlan since that loses a lot of information that the rule might know (for example, the rule should know what expressions are potentially new vs the ones that are old).
The text was updated successfully, but these errors were encountered:
If we can correctly handle the following example, I think we are good to go:
Example:
Filter push down predicates down below a Join:
Initial Plan:
(r)Filter// group 10, scalar annotation: t2.v1 > 10 (s)Greater// group 9(s) t1.v1// group 8(s)10// group 7 (r)Join// group 6, scalar annotation: t1.v1 = t2.v1(s)Eq// group 5(s) t1.v1// group 4(s) t2.v1// group 3(r)Scan(t1)// group 1(r)Scan(t2)// group 2
match / "check_pattern":
(r)Filter// group 10, scalar annotation: t2.v1 > 10 (s)Greater// group 9(s) t1.v1// group 8(s)10// group 7 (r)Join// group 6, scalar annotation: t1.v1 = t2.v1(s)Eq// group 5(s) t1.v1// group 4(s) t2.v1// group 3(r)GroupId(1)(r)GroupId(2)
After the apply:
(r)Join// NEW EXPR, OLD GROUP(s)Eq// group 5, OLD(s) t1.v1// group 4, OLD(s) t2.v1// group 3, OLD(r)GroupId(1)// OLD(r)Filter// NEW EXPR, NEW GROUP(s)Greater// group 9(s) t1.v1// group 8(s)10// group 7
If we return a partial plan, then we will have the information of which group (r) Filter // NEW EXPR, NEW GROUP belongs to before inserting the Join // NEW EXPR, OLD GROUP.
There might be a more clever way to deal with this.
The implementation rule API is likely pretty simple, so we should aim to stabilize that quickly.
On the other hand, we should make sure the transformation rule API makes sense. Returning a
Vec<LogicalExpression>
doesn't really make sense because transformation rules really emit a whole bunch of things including logical expressions, groups, and scalars.However, we also don't want to just return a single
PartialLogicalPlan
since that loses a lot of information that the rule might know (for example, the rule should know what expressions are potentially new vs the ones that are old).The text was updated successfully, but these errors were encountered: