Skip to content

Commit

Permalink
fix: fix unsigned int slicewindow error issue #25956
Browse files Browse the repository at this point in the history
fix unsigned int slicewindow error issue #25956

Closes: #25956
  • Loading branch information
pengdaqian.0 committed Jul 7, 2021
1 parent 297a90d commit 63309ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion executor/aggfuncs/func_max_min.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ func (e *maxMin4UintSliding) UpdatePartialResult(sctx sessionctx.Context, rowsIn
if isNull {
continue
}
err = p.deque.Enqueue(uint64(i)+e.start, input)
err = p.deque.Enqueue(uint64(i)+e.start, uint64(input))
if err != nil {
return 0, err
}
Expand Down
6 changes: 6 additions & 0 deletions executor/aggfuncs/func_max_min_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,12 @@ func (s *testSuite) TestMaxSlidingWindow(c *C) {
expect: []string{"3", "3", "3"},
orderByExpect: []string{"1", "2", "3"},
},
{
rowType: "int unsigned",
insertValue: "(1), (3), (2)",
expect: []string{"3", "3", "3"},
orderByExpect: []string{"1", "2", "3"},
},
{
rowType: "float",
insertValue: "(1.1), (3.3), (2.2)",
Expand Down

0 comments on commit 63309ac

Please sign in to comment.