fix bug about aggr ppd. (#1472)
This commit is contained in:
@ -84,6 +84,11 @@ func (s *testPlanSuite) TestPredicatePushDown(c *C) {
|
||||
first string
|
||||
best string
|
||||
}{
|
||||
{
|
||||
sql: "select count(*) from t a, t b where a.a = b.a",
|
||||
first: "Join{DataScan(t)->DataScan(t)}->Selection->Aggr->Projection",
|
||||
best: "Join{DataScan(t)->DataScan(t)}->Aggr->Projection",
|
||||
},
|
||||
{
|
||||
sql: "select a from (select a from t where d = 0) k where k.a = 5",
|
||||
first: "DataScan(t)->Selection->Projection->Selection->Projection",
|
||||
|
||||
@ -185,6 +185,7 @@ func (p *NewUnion) PredicatePushDown(predicates []expression.Expression) (ret []
|
||||
// PredicatePushDown implements LogicalPlan PredicatePushDown interface.
|
||||
func (p *Aggregation) PredicatePushDown(predicates []expression.Expression) ([]expression.Expression, LogicalPlan, error) {
|
||||
// TODO: implement aggregation push down.
|
||||
p.GetChildByIndex(0).(LogicalPlan).PredicatePushDown(nil)
|
||||
return predicates, p, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user