MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / makeUnique

Method makeUnique

pkg/sql/sem/tree/datum.go:3186–3195  ·  view source on GitHub ↗
(ctx *EvalContext)

Source from the content-addressed store, hash-verified

3184}
3185
3186func (d *DTuple) makeUnique(ctx *EvalContext) {
3187 n := 0
3188 for i := 0; i < len(d.D); i++ {
3189 if n == 0 || d.D[n-1].Compare(ctx, d.D[i]) < 0 {
3190 d.D[n] = d.D[i]
3191 n++
3192 }
3193 }
3194 d.D = d.D[:n]
3195}
3196
3197// Size implements the Datum interface.
3198func (d *DTuple) Size() uintptr {

Callers 1

NormalizeMethod · 0.95

Calls 1

CompareMethod · 0.65

Tested by

no test coverage detected