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

Method Max

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

Max implements the Datum interface.

(ctx context.Context, cmpCtx CompareContext)

Source from the content-addressed store, hash-verified

4674
4675// Max implements the Datum interface.
4676func (d *DTuple) Max(ctx context.Context, cmpCtx CompareContext) (Datum, bool) {
4677 res := NewDTupleWithLen(d.typ, len(d.D))
4678 for i, v := range d.D {
4679 m, ok := v.Max(ctx, cmpCtx)
4680 if !ok {
4681 return nil, false
4682 }
4683 res.D[i] = m
4684 }
4685 return res, true
4686}
4687
4688// Min implements the Datum interface.
4689func (d *DTuple) Min(ctx context.Context, cmpCtx CompareContext) (Datum, bool) {

Callers

nothing calls this directly

Calls 2

NewDTupleWithLenFunction · 0.85
MaxMethod · 0.65

Tested by

no test coverage detected