Skip to content

Commit

Permalink
cherry pick pingcap#33895 to release-5.2
Browse files Browse the repository at this point in the history
Signed-off-by: ti-srebot <[email protected]>
  • Loading branch information
wshwsh12 authored and ti-srebot committed Apr 13, 2022
1 parent 8a6e5a7 commit a559338
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions executor/hash_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,19 @@ func (s *pkgTestSerialSuite) testHashRowContainer(c *C, hashFunc func() hash.Has
chk1, _ := initBuildChunk(numRows)

hCtx := &hashContext{
allTypes: colTypes,
allTypes: colTypes[1:3],
keyColIdx: []int{1, 2},
}
hCtx.hasNull = make([]bool, numRows)
for i := 0; i < numRows; i++ {
hCtx.hashVals = append(hCtx.hashVals, hashFunc())
}
<<<<<<< HEAD
rowContainer := newHashRowContainer(sctx, 0, hCtx)
=======
rowContainer := newHashRowContainer(sctx, 0, hCtx, colTypes)
copiedRC = rowContainer.ShallowCopy()
>>>>>>> ce8cefaa2... executor: fix test fail in TestHashRowContainer (#33895)
tracker := rowContainer.GetMemTracker()
tracker.SetLabel(memory.LabelForBuildSideResult)
if spill {
Expand All @@ -141,7 +146,7 @@ func (s *pkgTestSerialSuite) testHashRowContainer(c *C, hashFunc func() hash.Has
probeChk, probeColType := initProbeChunk(2)
probeRow := probeChk.GetRow(1)
probeCtx := &hashContext{
allTypes: probeColType,
allTypes: probeColType[1:3],
keyColIdx: []int{1, 2},
}
probeCtx.hasNull = make([]bool, 1)
Expand Down

0 comments on commit a559338

Please sign in to comment.