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

Method Min

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

Min implements the Datum interface.

(ctx context.Context, cmpCtx CompareContext)

Source from the content-addressed store, hash-verified

4687
4688// Min implements the Datum interface.
4689func (d *DTuple) Min(ctx context.Context, cmpCtx CompareContext) (Datum, bool) {
4690 res := NewDTupleWithLen(d.typ, len(d.D))
4691 for i, v := range d.D {
4692 m, ok := v.Min(ctx, cmpCtx)
4693 if !ok {
4694 return nil, false
4695 }
4696 res.D[i] = m
4697 }
4698 return res, true
4699}
4700
4701// IsMax implements the Datum interface.
4702func (d *DTuple) IsMax(ctx context.Context, cmpCtx CompareContext) bool {

Callers

nothing calls this directly

Calls 2

NewDTupleWithLenFunction · 0.85
MinMethod · 0.65

Tested by

no test coverage detected