in exprs.go [772:807]
func createBoundLiteralPredicate(op Operation, term BoundTerm, lit Literal) (BoundPredicate, error) {
finalLit, err := lit.To(term.Type())
if err != nil {
return nil, err
}
switch term.Type().(type) {
case BooleanType:
return newBoundLiteralPredicate[bool](op, term, finalLit), nil
case Int32Type:
return newBoundLiteralPredicate[int32](op, term, finalLit), nil
case Int64Type:
return newBoundLiteralPredicate[int64](op, term, finalLit), nil
case Float32Type:
return newBoundLiteralPredicate[float32](op, term, finalLit), nil
case Float64Type:
return newBoundLiteralPredicate[float64](op, term, finalLit), nil
case DateType:
return newBoundLiteralPredicate[Date](op, term, finalLit), nil
case TimeType:
return newBoundLiteralPredicate[Time](op, term, finalLit), nil
case TimestampType, TimestampTzType:
return newBoundLiteralPredicate[Timestamp](op, term, finalLit), nil
case StringType:
return newBoundLiteralPredicate[string](op, term, finalLit), nil
case FixedType, BinaryType:
return newBoundLiteralPredicate[[]byte](op, term, finalLit), nil
case DecimalType:
return newBoundLiteralPredicate[Decimal](op, term, finalLit), nil
case UUIDType:
return newBoundLiteralPredicate[uuid.UUID](op, term, finalLit), nil
}
return nil, fmt.Errorf("%w: could not create bound literal predicate for term type %s",
ErrInvalidArgument, term.Type())
}