Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions pkg/vm/engine/test/testutil/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"testing"
"time"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/exp/rand"

Expand Down Expand Up @@ -52,13 +51,6 @@ func GetDefaultTestPath(module string, t *testing.T) string {
return filepath.Join("/tmp", dirName, module, t.Name())
}

func MakeDefaultTestPath(module string, t *testing.T) string {
path := GetDefaultTestPath(module, t)
err := os.MkdirAll(path, os.FileMode(0755))
assert.Nil(t, err)
return path
}

type TestDisttaeEngineOptions func(*TestDisttaeEngine)

func WithDisttaeEngineInsertEntryMaxCount(v int) TestDisttaeEngineOptions {
Expand Down Expand Up @@ -206,37 +198,6 @@ func EngineTableDefBySchema(schema *catalog.Schema) ([]engine.TableDef, error) {
return defs, nil
}

func EngineDefAddIndex(defs []engine.TableDef, idxColName string) []engine.TableDef {
indexes := []*plan.IndexDef{
{
IndexName: "hnsw_idx",
TableExist: true,
IndexAlgo: catalog2.MoIndexHnswAlgo.ToString(),
IndexAlgoTableType: catalog2.Hnsw_TblType_Metadata,
IndexTableName: "meta_tbl",
Parts: []string{idxColName},
IndexAlgoParams: `{"m":"16","ef_construction":"200","ef_search":"100","op_type":"vector_l2_ops"}`,
},
{
IndexName: "hnsw_idx",
TableExist: true,
IndexAlgo: catalog2.MoIndexHnswAlgo.ToString(),
IndexAlgoTableType: catalog2.Hnsw_TblType_Storage,
IndexTableName: "storage_tbl",
Parts: []string{idxColName},
IndexAlgoParams: `{"m":"16","ef_construction":"200","ef_search":"100","op_type":"vector_l2_ops"}`,
},
}
for _, def := range defs {
if con, ok := def.(*engine.ConstraintDef); ok {
con.Cts = append(con.Cts, &engine.IndexDef{
Indexes: indexes,
})
}
}
return defs
}

func NewDefaultTableReader(
ctx context.Context,
rel engine.Relation,
Expand Down
Loading