Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
systay committed Jan 17, 2025
1 parent b16f792 commit a835d8b
Show file tree
Hide file tree
Showing 3 changed files with 888 additions and 0 deletions.
38 changes: 38 additions & 0 deletions go/vt/vtgate/planbuilder/plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -872,3 +872,41 @@ func benchmarkPlanner(b *testing.B, version plancontext.PlannerVersion, testCase
}
}
}

func (s *planTestSuite) TestMy() {
vschema, err := vschemawrapper.NewVschemaWrapper(
vtenv.NewTestEnv(),
loadSchema(s.T(), "vschemas/my_schema.json", true),
TestBuilder,
)
require.NoError(s.T(), err)
// vschema := &vschemawrapper.VSchemaWrapper{
// V: loadSchema(s.T(), "vschemas/my_schema.json", true),
// SysVarEnabled: true,
// Version: Gen4,
// Env: vtenv.NewTestEnv(),
// }

s.testFile("my.json", vschema, false)
}

func BenchmarkMine(b *testing.B) {
vschema, err := vschemawrapper.NewVschemaWrapper(
vtenv.NewTestEnv(),
loadSchema(b, "vschemas/my_schema.json", true),
TestBuilder,
)
require.NoError(b, err)
testCases := readJSONTests("my.json")

b.ReportAllocs()
b.ResetTimer()
for range b.N {
for _, tcase := range testCases {
plan, _ := TestBuilder(tcase.Query, vschema, vschema.CurrentDb())
if plan == nil {
panic("")
}
}
}
}
Loading

0 comments on commit a835d8b

Please sign in to comment.