Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

executor: fix unsigned int window function error #26010

Merged
merged 2 commits into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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