Skip to content

Commit 20d5e94

Browse files
committed
Merge branch 'main' of https://github.com/dolthub/go-mysql-server into angela/pk_join
2 parents f208c11 + 11ef8b7 commit 20d5e94

29 files changed

+616
-191
lines changed

enginetest/enginetests.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6147,6 +6147,26 @@ func TestSQLLogicTests(t *testing.T, harness Harness) {
61476147
}
61486148
}
61496149

6150+
func TestTimeQueries(t *testing.T, harness Harness) {
6151+
// "America/Phoenix" is a non-UTC time zone that does not observe daylight savings time
6152+
phoenixTimeZone, _ := time.LoadLocation("America/Phoenix")
6153+
mockNow := time.Date(2025, time.July, 23, 9, 43, 21, 0, phoenixTimeZone)
6154+
for _, script := range queries.TimeQueryTests {
6155+
if sh, ok := harness.(SkippingHarness); ok {
6156+
if sh.SkipQueryTest(script.Name) {
6157+
t.Run(script.Name, func(t *testing.T) {
6158+
t.Skip(script.Name)
6159+
})
6160+
continue
6161+
}
6162+
}
6163+
sql.RunWithNowFunc(func() time.Time { return mockNow }, func() error {
6164+
TestScript(t, harness, script)
6165+
return nil
6166+
})
6167+
}
6168+
}
6169+
61506170
// ExecuteNode builds an iterator and then drains it.
61516171
// This is useful for populating actual row counts for `DESCRIBE ANALYZE`.
61526172
func ExecuteNode(ctx *sql.Context, engine QueryEngine, node sql.Node) error {

enginetest/memory_engine_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,3 +1097,7 @@ func TestSQLLogicTestFiles(t *testing.T) {
10971097
}
10981098
logictest.RunTestFiles(h, paths...)
10991099
}
1100+
1101+
func TestTimeQueries(t *testing.T) {
1102+
enginetest.TestTimeQueries(t, enginetest.NewDefaultMemoryHarness())
1103+
}

enginetest/queries/query_plans.go

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)