-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
fix top container reset Approved by: @badboynt1, @sukki37
- Loading branch information
1 parent
1d2305a
commit 83164a1
Showing
2 changed files
with
59 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Copyright 2021 Matrix Origin | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package top | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/matrixorigin/matrixone/pkg/container/batch" | ||
"github.com/matrixorigin/matrixone/pkg/testutil" | ||
"github.com/matrixorigin/matrixone/pkg/vm/process" | ||
) | ||
|
||
func Test_container_reset(t *testing.T) { | ||
bat := batch.New([]string{"id"}) | ||
bat.Vecs[0] = testutil.MakeInt32Vector([]int32{1, 2, 3}, nil) | ||
buildBat := batch.New([]string{"id"}) | ||
buildBat.Vecs[0] = testutil.MakeInt32Vector([]int32{1, 2, 3}, nil) | ||
|
||
proc := &process.Process{ | ||
Base: &process.BaseProcess{}, | ||
} | ||
proc.SetMPool(testutil.TestUtilMp) | ||
|
||
c := &container{ | ||
n: 0, | ||
state: 0, | ||
sels: nil, | ||
poses: nil, | ||
cmps: nil, | ||
limit: 0, | ||
limitExecutor: nil, | ||
executorsForOrderColumn: nil, | ||
desc: false, | ||
topValueZM: nil, | ||
bat: bat, | ||
buildBat: buildBat, | ||
} | ||
c.reset(proc) | ||
} |