func (pv PlanValue) ResolveValue(bindVars map[string]*querypb.BindVariable) (Value, error) {
	switch {
	case pv.Key != "":
		bv, err := pv.lookupValue(bindVars)
		if err != nil {
			return NULL, err
		}
		return MakeTrusted(bv.Type, bv.Value), nil
	case !pv.Value.IsNull():
		return pv.Value, nil
	case pv.ListKey != "" || pv.Values != nil:
		// This code is unreachable because the parser does not allow
		// multi-value constructs where a single value is expected.
		return NULL, errors.New("a list was supplied where a single value was expected")
	}
	return NULL, nil
}
func (pv PlanValue) ResolveValue(bindVars map[string]*querypb.BindVariable) (Value, error) {
	switch {
	case pv.Key != "":
		bv, err := pv.lookupValue(bindVars)
		if err != nil {
			return NULL, err
		}
		return MakeTrusted(bv.Type, bv.Value), nil
	case !pv.Value.IsNull():
		return pv.Value, nil
	case pv.ListKey != "" || pv.Values != nil:
		// This code is unreachable because the parser does not allow
		// multi-value constructs where a single value is expected.
		return NULL, errors.New("a list was supplied where a single value was expected")
	}
	return NULL, nil
}
// ResolveValue resolves a PlanValue as a single value based on the supplied bindvars.