diff --git a/go/go.mod b/go/go.mod index 9e3f7221a20..f91b2581088 100644 --- a/go/go.mod +++ b/go/go.mod @@ -59,6 +59,7 @@ require ( github.com/dolthub/go-mysql-server v0.19.1-0.20241231201953-4af32d139747 github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63 github.com/dolthub/swiss v0.1.0 + github.com/esote/minmaxheap v1.0.0 github.com/goccy/go-json v0.10.2 github.com/google/btree v1.1.2 github.com/google/go-github/v57 v57.0.0 @@ -110,7 +111,6 @@ require ( github.com/dolthub/go-icu-regex v0.0.0-20241215010122-db690dd53c90 // indirect github.com/dolthub/jsonpath v0.0.2-0.20240227200619-19675ab05c71 // indirect github.com/dolthub/maphash v0.0.0-20221220182448-74e1e1ea1577 // indirect - github.com/esote/minmaxheap v1.0.0 // indirect github.com/go-fonts/liberation v0.2.0 // indirect github.com/go-kit/kit v0.10.0 // indirect github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81 // indirect diff --git a/go/libraries/doltcore/doltdb/durable/index.go b/go/libraries/doltcore/doltdb/durable/index.go index dfaaf83a3ee..726e2038154 100644 --- a/go/libraries/doltcore/doltdb/durable/index.go +++ b/go/libraries/doltcore/doltdb/durable/index.go @@ -18,10 +18,11 @@ import ( "bytes" "context" "fmt" - "github.com/dolthub/go-mysql-server/sql/expression/function/vector" "io" "strings" + "github.com/dolthub/go-mysql-server/sql/expression/function/vector" + "github.com/dolthub/dolt/go/libraries/doltcore/schema" "github.com/dolthub/dolt/go/store/hash" "github.com/dolthub/dolt/go/store/prolly" diff --git a/go/libraries/doltcore/schema/encoding/serialization.go b/go/libraries/doltcore/schema/encoding/serialization.go index f5f493ba4da..c62ba28155b 100644 --- a/go/libraries/doltcore/schema/encoding/serialization.go +++ b/go/libraries/doltcore/schema/encoding/serialization.go @@ -17,6 +17,7 @@ package encoding import ( "context" "fmt" + fb "github.com/dolthub/flatbuffers/v23/go" "github.com/dolthub/go-mysql-server/sql" "github.com/dolthub/go-mysql-server/sql/expression/function/vector" diff --git a/go/libraries/doltcore/schema/index_coll.go b/go/libraries/doltcore/schema/index_coll.go index 16dca5b7969..c61844c7f99 100644 --- a/go/libraries/doltcore/schema/index_coll.go +++ b/go/libraries/doltcore/schema/index_coll.go @@ -16,9 +16,10 @@ package schema import ( "fmt" - "github.com/dolthub/go-mysql-server/sql/expression/function/vector" "sort" "strings" + + "github.com/dolthub/go-mysql-server/sql/expression/function/vector" ) type IndexCollection interface { diff --git a/go/libraries/doltcore/sqle/index/dolt_index.go b/go/libraries/doltcore/sqle/index/dolt_index.go index 9742aad361c..11f2c8b1d86 100644 --- a/go/libraries/doltcore/sqle/index/dolt_index.go +++ b/go/libraries/doltcore/sqle/index/dolt_index.go @@ -18,12 +18,12 @@ import ( "context" "errors" "fmt" - "github.com/dolthub/go-mysql-server/sql/expression/function/vector" "strings" "sync/atomic" "github.com/dolthub/go-mysql-server/sql" "github.com/dolthub/go-mysql-server/sql/expression" + "github.com/dolthub/go-mysql-server/sql/expression/function/vector" "github.com/dolthub/go-mysql-server/sql/fulltext" sqltypes "github.com/dolthub/go-mysql-server/sql/types" diff --git a/go/libraries/doltcore/sqle/tables.go b/go/libraries/doltcore/sqle/tables.go index 94d2449cea9..3bedf3de0ba 100644 --- a/go/libraries/doltcore/sqle/tables.go +++ b/go/libraries/doltcore/sqle/tables.go @@ -19,7 +19,6 @@ import ( "context" "errors" "fmt" - "github.com/dolthub/go-mysql-server/sql/expression/function/vector" "io" "math" "os" @@ -31,6 +30,7 @@ import ( "github.com/dolthub/go-mysql-server/sql" "github.com/dolthub/go-mysql-server/sql/expression" + "github.com/dolthub/go-mysql-server/sql/expression/function/vector" "github.com/dolthub/go-mysql-server/sql/fulltext" sqltypes "github.com/dolthub/go-mysql-server/sql/types" diff --git a/go/store/prolly/proximity_map.go b/go/store/prolly/proximity_map.go index e06284da739..18b6110c5fb 100644 --- a/go/store/prolly/proximity_map.go +++ b/go/store/prolly/proximity_map.go @@ -16,16 +16,17 @@ package prolly import ( "context" - "github.com/dolthub/dolt/go/store/pool" - "github.com/dolthub/go-mysql-server/sql/expression/function/vector" "io" "iter" + "github.com/dolthub/go-mysql-server/sql" + "github.com/dolthub/go-mysql-server/sql/expression/function/vector" + "github.com/dolthub/dolt/go/store/hash" + "github.com/dolthub/dolt/go/store/pool" "github.com/dolthub/dolt/go/store/prolly/message" "github.com/dolthub/dolt/go/store/prolly/tree" "github.com/dolthub/dolt/go/store/val" - "github.com/dolthub/go-mysql-server/sql" ) // ProximityMap wraps a tree.ProximityMap but operates on typed Tuples instead of raw bytestrings. diff --git a/go/store/prolly/proximity_mutable_map.go b/go/store/prolly/proximity_mutable_map.go index 7e035b5b7c2..bbd6eb4d322 100644 --- a/go/store/prolly/proximity_mutable_map.go +++ b/go/store/prolly/proximity_mutable_map.go @@ -17,14 +17,16 @@ package prolly import ( "context" "fmt" + + "github.com/dolthub/go-mysql-server/sql" + "github.com/dolthub/go-mysql-server/sql/expression/function/vector" + "github.com/dolthub/dolt/go/gen/fb/serial" "github.com/dolthub/dolt/go/store/hash" "github.com/dolthub/dolt/go/store/prolly/message" "github.com/dolthub/dolt/go/store/prolly/tree" "github.com/dolthub/dolt/go/store/skip" "github.com/dolthub/dolt/go/store/val" - "github.com/dolthub/go-mysql-server/sql" - "github.com/dolthub/go-mysql-server/sql/expression/function/vector" ) type ProximityMutableMap = GenericMutableMap[ProximityMap, tree.ProximityMap[val.Tuple, val.Tuple, val.TupleDesc]] diff --git a/go/store/prolly/shim/shim.go b/go/store/prolly/shim/shim.go index af074640bb9..8825a191fc4 100644 --- a/go/store/prolly/shim/shim.go +++ b/go/store/prolly/shim/shim.go @@ -17,13 +17,15 @@ package shim import ( "context" "fmt" + + "github.com/dolthub/go-mysql-server/sql/expression/function/vector" + "github.com/dolthub/dolt/go/gen/fb/serial" "github.com/dolthub/dolt/go/libraries/doltcore/schema" "github.com/dolthub/dolt/go/store/prolly" "github.com/dolthub/dolt/go/store/prolly/tree" "github.com/dolthub/dolt/go/store/types" "github.com/dolthub/dolt/go/store/val" - "github.com/dolthub/go-mysql-server/sql/expression/function/vector" ) func NodeFromValue(v types.Value) (node tree.Node, fileId string, err error) { diff --git a/go/store/prolly/tree/proximity_map.go b/go/store/prolly/tree/proximity_map.go index f522e14ea11..1fa2a6f4943 100644 --- a/go/store/prolly/tree/proximity_map.go +++ b/go/store/prolly/tree/proximity_map.go @@ -17,13 +17,14 @@ package tree import ( "container/heap" "context" - "github.com/dolthub/dolt/go/store/skip" + "math" + "github.com/dolthub/go-mysql-server/sql" "github.com/dolthub/go-mysql-server/sql/expression/function/vector" - "math" + "github.com/esote/minmaxheap" "github.com/dolthub/dolt/go/store/hash" - "github.com/esote/minmaxheap" + "github.com/dolthub/dolt/go/store/skip" ) type KeyValueDistanceFn[K, V ~[]byte] func(key K, value V, distance float64) error