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

colexecjoin: optimize building output on the left in merge joiner #78101

Merged
merged 1 commit into from
Mar 23, 2022
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
4 changes: 2 additions & 2 deletions pkg/col/coldata/bytes.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ func (b *Bytes) Window(start, end int) *Bytes {
}
}

// copy copies a single value from src at position srcIdx into position destIdx
// Copy copies a single value from src at position srcIdx into position destIdx
// of the receiver. It is faster than b.Set(destIdx, src.Get(srcIdx)).
func (b *Bytes) copy(src *Bytes, destIdx, srcIdx int) {
func (b *Bytes) Copy(src *Bytes, destIdx, srcIdx int) {
if buildutil.CrdbTestBuild {
if b.isWindow {
panic("copy is called on a window into Bytes")
Expand Down
2 changes: 1 addition & 1 deletion pkg/col/coldata/bytes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func applyMethodsAndVerify(
destIdx := rng.Intn(n)
srcIdx := rng.Intn(sourceN)
debugString += fmt.Sprintf("(%d, %d)", destIdx, srcIdx)
b1.copy(b1Source, destIdx, srcIdx)
b1.Copy(b1Source, destIdx, srcIdx)
b2[destIdx] = append([]byte(nil), b2Source[srcIdx]...)
case copySlice, appendSlice:
// Generate a length-inclusive destIdx.
Expand Down
6 changes: 3 additions & 3 deletions pkg/col/coldata/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ func (js *JSONs) Window(start, end int) *JSONs {
}
}

// copy copies a single value from src at position srcIdx into position destIdx
// Copy copies a single value from src at position srcIdx into position destIdx
// of the receiver.
func (js *JSONs) copy(src *JSONs, destIdx, srcIdx int) {
js.Bytes.copy(&src.Bytes, destIdx, srcIdx)
func (js *JSONs) Copy(src *JSONs, destIdx, srcIdx int) {
js.Bytes.Copy(&src.Bytes, destIdx, srcIdx)
}

// CopySlice copies srcStartIdx inclusive and srcEndIdx exclusive []byte values
Expand Down
8 changes: 4 additions & 4 deletions pkg/col/coldata/vec.eg.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pkg/col/coldata/vec_tmpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func (m *memColumn) Copy(args SliceArgs) {
m.nulls.SetNull(i + args.DestIdx)
} else {
// {{if .IsBytesLike}}
toCol.copy(fromCol, i+args.DestIdx, selIdx)
toCol.Copy(fromCol, i+args.DestIdx, selIdx)
// {{else}}
v := fromCol.Get(selIdx)
// {{if .Sliceable}}
Expand Down Expand Up @@ -238,7 +238,7 @@ func (m *memColumn) Copy(args SliceArgs) {
//gcassert:bce
selIdx := sel[i]
// {{if .IsBytesLike}}
toCol.copy(fromCol, i+args.DestIdx, selIdx)
toCol.Copy(fromCol, i+args.DestIdx, selIdx)
// {{else}}
v := fromCol.Get(selIdx)
// {{if .Sliceable}}
Expand Down Expand Up @@ -285,7 +285,7 @@ func _COPY_WITH_REORDERED_SOURCE(_SRC_HAS_NULLS bool) { // */}}
// {{end}}
{
// {{if .IsBytesLike}}
toCol.copy(fromCol, destIdx, srcIdx)
toCol.Copy(fromCol, destIdx, srcIdx)
// {{else}}
v := fromCol.Get(srcIdx)
toCol.Set(destIdx, v)
Expand Down
Loading