Skip to content

Commit

Permalink
executor: Improve the performance of WindowExec by using sliding wi…
Browse files Browse the repository at this point in the history
…ndow pingcap#14294

aggFuncSum bench
  • Loading branch information
mmyj committed Mar 5, 2020
1 parent 974afc5 commit e535b73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions executor/benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func buildMockDataSource(opt mockDataSourceParameters) *mockDataSource {
m.genData[idx].AppendInt64(colIdx, colData[colIdx][i].(int64))
case mysql.TypeDouble, mysql.TypeFloat:
m.genData[idx].AppendFloat64(colIdx, colData[colIdx][i].(float64))
case mysql.TypeDecimal:
case mysql.TypeNewDecimal:
m.genData[idx].AppendMyDecimal(colIdx, colData[colIdx][i].(*types.MyDecimal))
case mysql.TypeVarString:
m.genData[idx].AppendString(colIdx, colData[colIdx][i].(string))
Expand Down Expand Up @@ -548,7 +548,7 @@ func benchmarkWindowExecWithCase(b *testing.B, casTest *windowTestCase) {
ret = int64(row)
case mysql.TypeDouble, mysql.TypeFloat:
ret = float64(row)
case mysql.TypeDecimal:
case mysql.TypeNewDecimal:
ret = types.NewDecFromInt(int64(row))
case mysql.TypeVarString:
ret = casTest.rawDataSmall
Expand Down Expand Up @@ -702,7 +702,7 @@ func baseBenchmarkWindowFunctionsWithSlidingWindow(b *testing.B, frameType ast.F
aggFunc string
aggColTypes []byte
}{
{ast.AggFuncSum, []byte{mysql.TypeDecimal, mysql.TypeFloat}},
{ast.AggFuncSum, []byte{mysql.TypeNewDecimal, mysql.TypeFloat}},
{ast.AggFuncCount, []byte{mysql.TypeLong}},
}
rows := []int{1000, 100000}
Expand Down

0 comments on commit e535b73

Please sign in to comment.