Skip to content

Commit b4bf2b5

Browse files
committed
Add vector functions to builtin functions.
1 parent 9feb775 commit b4bf2b5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sql/expression/function/registry.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"github.com/dolthub/go-mysql-server/sql/expression/function/aggregation/window"
2525
"github.com/dolthub/go-mysql-server/sql/expression/function/json"
2626
"github.com/dolthub/go-mysql-server/sql/expression/function/spatial"
27+
"github.com/dolthub/go-mysql-server/sql/expression/function/vector"
2728
)
2829

2930
// ErrFunctionAlreadyRegistered is thrown when a function is already registered
@@ -309,6 +310,8 @@ var BuiltIns = []sql.Function{
309310
sql.FunctionN{Name: "week", Fn: NewWeek},
310311
sql.Function1{Name: "values", Fn: NewValues},
311312
sql.Function1{Name: "validate_password_strength", Fn: NewValidatePasswordStrength},
313+
sql.Function2{Name: "vec_distance", Fn: vector.NewL2SquaredDistance},
314+
sql.Function2{Name: "vec_distance_l2_squared", Fn: vector.NewL2SquaredDistance},
312315
sql.Function1{Name: "weekday", Fn: NewWeekday},
313316
sql.Function1{Name: "weekofyear", Fn: NewWeekOfYear},
314317
sql.Function1{Name: "year", Fn: NewYear},

0 commit comments

Comments
 (0)