MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / ReplaceCol

Method ReplaceCol

pkg/col/coldata/batch.go:400–406  ·  view source on GitHub ↗

ReplaceCol implements the Batch interface.

(col *Vec, colIdx int)

Source from the content-addressed store, hash-verified

398
399// ReplaceCol implements the Batch interface.
400func (m *MemBatch) ReplaceCol(col *Vec, colIdx int) {
401 if m.b[colIdx] != nil && m.b[colIdx].t != nil && !m.b[colIdx].Type().Identical(col.Type()) {
402 panic(fmt.Sprintf("unexpected replacement: original vector is %s "+
403 "whereas the replacement is %s", m.b[colIdx].Type(), col.Type()))
404 }
405 m.b[colIdx] = col
406}
407
408// Reset implements the Batch interface.
409func (m *MemBatch) Reset(typs []*types.T, length int, factory ColumnFactory) {

Callers

nothing calls this directly

Calls 2

TypeMethod · 0.65
IdenticalMethod · 0.45

Tested by

no test coverage detected