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

Method maybePopulateType

pkg/sql/sem/tree/datum.go:4568–4576  ·  view source on GitHub ↗

maybePopulateType populates the tuple's type if it hasn't yet been populated.

()

Source from the content-addressed store, hash-verified

4566// maybePopulateType populates the tuple's type if it hasn't yet been
4567// populated.
4568func (d *DTuple) maybePopulateType() {
4569 if d.typ == nil {
4570 contents := make([]*types.T, len(d.D))
4571 for i, v := range d.D {
4572 contents[i] = v.ResolvedType()
4573 }
4574 d.typ = types.MakeTuple(contents)
4575 }
4576}
4577
4578// ResolvedType implements the TypedExpr interface.
4579func (d *DTuple) ResolvedType() *types.T {

Callers 2

ResolvedTypeMethod · 0.95
AsJSONFunction · 0.80

Calls 2

MakeTupleFunction · 0.92
ResolvedTypeMethod · 0.65

Tested by

no test coverage detected