Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
alivxxx committed Jan 7, 2019
1 parent 4697196 commit 59c86e3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions executor/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -1894,10 +1894,10 @@ func (b *executorBuilder) buildWindow(v *plannercore.PhysicalWindow) *WindowExec
return nil
}
e := &WindowExec{baseExecutor: base,
windowFunc: windowFunc,
windowFunc: windowFunc,
partialResult: windowFunc.AllocPartialResult(),
groupChecker: newGroupChecker(b.ctx.GetSessionVars().StmtCtx, groupByItems),
childCols: v.ChildCols,
groupChecker: newGroupChecker(b.ctx.GetSessionVars().StmtCtx, groupByItems),
childCols: v.ChildCols,
}
return e
}
6 changes: 3 additions & 3 deletions executor/windowfuncs/window_funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ type WindowFunc interface {

// aggWithoutFrame deals with agg functions with no frame specification.
type aggWithoutFrame struct {
agg aggfuncs.AggFunc
agg aggfuncs.AggFunc
remained int64
}

type partialResult4AggWithoutFrame struct {
result aggfuncs.PartialResult
result aggfuncs.PartialResult
}

// ProcessOneChunk implements the WindowFunc interface.
Expand Down Expand Up @@ -78,7 +78,7 @@ func (wf *aggWithoutFrame) ExhaustResult(sctx sessionctx.Context, rows []chunk.R
}

// AllocPartialResult implements the WindowFunc interface.
func (wf *aggWithoutFrame) AllocPartialResult() PartialResult{
func (wf *aggWithoutFrame) AllocPartialResult() PartialResult {
return PartialResult(&partialResult4AggWithoutFrame{wf.agg.AllocPartialResult()})
}

Expand Down
4 changes: 2 additions & 2 deletions planner/core/logical_plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1990,11 +1990,11 @@ func (s *testPlanSuite) TestWindowFunction(c *C) {
},
{
sql: "select sum(a) over(w1), avg(a) over(w2) from t window w1 as (partition by a), w2 as (w1)",
result: "TableReader(Table(t))->Window(sum(test.t.a))->Window(avg(test.t.a))->Projection",
result: "TableReader(Table(t))->Window(sum(cast(test.t.a)))->Window(avg(cast(test.t.a)))->Projection",
},
{
sql: "select a from t window w1 as (partition by a) order by (sum(a) over(w1))",
result: "TableReader(Table(t))->Window(sum(test.t.a))->Sort->Projection",
result: "TableReader(Table(t))->Window(sum(cast(test.t.a)))->Sort->Projection",
},
}

Expand Down

0 comments on commit 59c86e3

Please sign in to comment.