MCPcopy Index your code
hub / github.com/pingcap/tidb / buildVirtualColumnInfo

Function buildVirtualColumnInfo

pkg/executor/table_reader.go:637–646  ·  view source on GitHub ↗

buildVirtualColumnInfo saves virtual column indices and sort them in definition order

(schema *expression.Schema, columns []*model.ColumnInfo)

Source from the content-addressed store, hash-verified

635
636// buildVirtualColumnInfo saves virtual column indices and sort them in definition order
637func buildVirtualColumnInfo(schema *expression.Schema, columns []*model.ColumnInfo) (colIndexs []int, retTypes []*types.FieldType) {
638 colIndexs = buildVirtualColumnIndex(schema, columns)
639 if len(colIndexs) > 0 {
640 retTypes = make([]*types.FieldType, len(colIndexs))
641 for i, idx := range colIndexs {
642 retTypes[i] = schema.Columns[idx].RetType
643 }
644 }
645 return colIndexs, retTypes
646}
647
648type tableResultHandler struct {
649 // If the pk is unsigned and we have KeepOrder=true and want ascending order,

Callers 2

buildMPPGatherMethod · 0.85

Calls 1

buildVirtualColumnIndexFunction · 0.85

Tested by

no test coverage detected