From 8e63921cef9bed9cce602237517d1e50e88f852e Mon Sep 17 00:00:00 2001 From: angelamayxie Date: Tue, 2 Dec 2025 15:35:40 -0800 Subject: [PATCH 1/6] update datetime type to datetime3 for dolt tables --- go/go.mod | 2 +- go/go.sum | 2 ++ go/libraries/doltcore/sqle/dtablefunctions/dolt_log.go | 2 +- go/libraries/doltcore/sqle/sqlselect_test.go | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/go/go.mod b/go/go.mod index 3b95af565d..d14b0898fc 100644 --- a/go/go.mod +++ b/go/go.mod @@ -61,7 +61,7 @@ require ( github.com/dolthub/dolt-mcp v0.2.2 github.com/dolthub/eventsapi_schema v0.0.0-20250915094920-eadfd39051ca github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2 - github.com/dolthub/go-mysql-server v0.20.1-0.20251202220822-4462fa0c6550 + github.com/dolthub/go-mysql-server v0.20.1-0.20251202232759-d8c980a04a5d github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63 github.com/edsrzf/mmap-go v1.2.0 github.com/esote/minmaxheap v1.0.0 diff --git a/go/go.sum b/go/go.sum index 86b605de88..cebd949b06 100644 --- a/go/go.sum +++ b/go/go.sum @@ -197,6 +197,8 @@ github.com/dolthub/go-icu-regex v0.0.0-20250916051405-78a38d478790 h1:zxMsH7RLiG github.com/dolthub/go-icu-regex v0.0.0-20250916051405-78a38d478790/go.mod h1:F3cnm+vMRK1HaU6+rNqQrOCyR03HHhR1GWG2gnPOqaE= github.com/dolthub/go-mysql-server v0.20.1-0.20251202220822-4462fa0c6550 h1:vbcyxdYGXiVd+tPFr6rXymmAW5KKvmKm0AQVHjFQDF8= github.com/dolthub/go-mysql-server v0.20.1-0.20251202220822-4462fa0c6550/go.mod h1:pD0T+xZWBDO5yxHAY9FUqArKvhvw6KYqxRmEk3NfQNw= +github.com/dolthub/go-mysql-server v0.20.1-0.20251202232759-d8c980a04a5d h1:h+Z/Rr5l5orrdYk/LFESByUXzwYw+vM/vFZ7GyCP3mY= +github.com/dolthub/go-mysql-server v0.20.1-0.20251202232759-d8c980a04a5d/go.mod h1:pD0T+xZWBDO5yxHAY9FUqArKvhvw6KYqxRmEk3NfQNw= github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63 h1:OAsXLAPL4du6tfbBgK0xXHZkOlos63RdKYS3Sgw/dfI= github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63/go.mod h1:lV7lUeuDhH5thVGDCKXbatwKy2KW80L4rMT46n+Y2/Q= github.com/dolthub/ishell v0.0.0-20240701202509-2b217167d718 h1:lT7hE5k+0nkBdj/1UOSFwjWpNxf+LCApbRHgnCA17XE= diff --git a/go/libraries/doltcore/sqle/dtablefunctions/dolt_log.go b/go/libraries/doltcore/sqle/dtablefunctions/dolt_log.go index eddc5806ac..b3f8847e25 100644 --- a/go/libraries/doltcore/sqle/dtablefunctions/dolt_log.go +++ b/go/libraries/doltcore/sqle/dtablefunctions/dolt_log.go @@ -177,7 +177,7 @@ var logTableSchema = sql.Schema{ &sql.Column{Name: "commit_hash", Type: types.Text}, &sql.Column{Name: "committer", Type: types.Text}, &sql.Column{Name: "email", Type: types.Text}, - &sql.Column{Name: "date", Type: types.Datetime}, + &sql.Column{Name: "date", Type: types.Datetime3}, &sql.Column{Name: "message", Type: types.Text}, &sql.Column{Name: "commit_order", Type: types.Uint64}, } diff --git a/go/libraries/doltcore/sqle/sqlselect_test.go b/go/libraries/doltcore/sqle/sqlselect_test.go index 8a54315cbe..ea532fbcb3 100644 --- a/go/libraries/doltcore/sqle/sqlselect_test.go +++ b/go/libraries/doltcore/sqle/sqlselect_test.go @@ -793,7 +793,7 @@ func BasicSelectTests() []SelectTest { &sql.Column{Name: "hash", Type: gmstypes.Text}, &sql.Column{Name: "latest_committer", Type: gmstypes.Text}, &sql.Column{Name: "latest_committer_email", Type: gmstypes.Text}, - &sql.Column{Name: "latest_commit_date", Type: gmstypes.Datetime}, + &sql.Column{Name: "latest_commit_date", Type: gmstypes.Datetime3}, &sql.Column{Name: "latest_commit_message", Type: gmstypes.Text}, &sql.Column{Name: "remote", Type: gmstypes.Text}, &sql.Column{Name: "branch", Type: gmstypes.Text}, From 8f6b47c7eea4c542f9b31d561ec0d82553187f52 Mon Sep 17 00:00:00 2001 From: angelamayxie Date: Tue, 2 Dec 2025 23:45:43 +0000 Subject: [PATCH 2/6] [ga-format-pr] Run go/utils/repofmt/format_repo.sh and go/Godeps/update.sh --- go/go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/go/go.sum b/go/go.sum index cebd949b06..420dcc1ff6 100644 --- a/go/go.sum +++ b/go/go.sum @@ -195,8 +195,6 @@ github.com/dolthub/fslock v0.0.3 h1:iLMpUIvJKMKm92+N1fmHVdxJP5NdyDK5bK7z7Ba2s2U= github.com/dolthub/fslock v0.0.3/go.mod h1:QWql+P17oAAMLnL4HGB5tiovtDuAjdDTPbuqx7bYfa0= github.com/dolthub/go-icu-regex v0.0.0-20250916051405-78a38d478790 h1:zxMsH7RLiG+dlZ/y0LgJHTV26XoiSJcuWq+em6t6VVc= github.com/dolthub/go-icu-regex v0.0.0-20250916051405-78a38d478790/go.mod h1:F3cnm+vMRK1HaU6+rNqQrOCyR03HHhR1GWG2gnPOqaE= -github.com/dolthub/go-mysql-server v0.20.1-0.20251202220822-4462fa0c6550 h1:vbcyxdYGXiVd+tPFr6rXymmAW5KKvmKm0AQVHjFQDF8= -github.com/dolthub/go-mysql-server v0.20.1-0.20251202220822-4462fa0c6550/go.mod h1:pD0T+xZWBDO5yxHAY9FUqArKvhvw6KYqxRmEk3NfQNw= github.com/dolthub/go-mysql-server v0.20.1-0.20251202232759-d8c980a04a5d h1:h+Z/Rr5l5orrdYk/LFESByUXzwYw+vM/vFZ7GyCP3mY= github.com/dolthub/go-mysql-server v0.20.1-0.20251202232759-d8c980a04a5d/go.mod h1:pD0T+xZWBDO5yxHAY9FUqArKvhvw6KYqxRmEk3NfQNw= github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63 h1:OAsXLAPL4du6tfbBgK0xXHZkOlos63RdKYS3Sgw/dfI= From 25f521b5da91807ff3e377192593fe788ab265bb Mon Sep 17 00:00:00 2001 From: angelamayxie Date: Tue, 2 Dec 2025 15:54:53 -0800 Subject: [PATCH 3/6] update datetime type to datetime3 --- go/libraries/doltcore/sqle/dtables/branches_table.go | 2 +- go/libraries/doltcore/sqle/dtables/log_table.go | 2 +- go/libraries/doltcore/sqle/sqlselect_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go/libraries/doltcore/sqle/dtables/branches_table.go b/go/libraries/doltcore/sqle/dtables/branches_table.go index 6ae651f17d..6898aa0669 100644 --- a/go/libraries/doltcore/sqle/dtables/branches_table.go +++ b/go/libraries/doltcore/sqle/dtables/branches_table.go @@ -235,7 +235,7 @@ func (bt *BranchesTable) Schema() sql.Schema { {Name: "hash", Type: types.Text, Source: bt.tableName, PrimaryKey: false, Nullable: false, DatabaseSource: bt.db.Name()}, {Name: "latest_committer", Type: types.Text, Source: bt.tableName, PrimaryKey: false, Nullable: true, DatabaseSource: bt.db.Name()}, {Name: "latest_committer_email", Type: types.Text, Source: bt.tableName, PrimaryKey: false, Nullable: true, DatabaseSource: bt.db.Name()}, - {Name: "latest_commit_date", Type: types.Datetime, Source: bt.tableName, PrimaryKey: false, Nullable: true, DatabaseSource: bt.db.Name()}, + {Name: "latest_commit_date", Type: types.Datetime3, Source: bt.tableName, PrimaryKey: false, Nullable: true, DatabaseSource: bt.db.Name()}, {Name: "latest_commit_message", Type: types.Text, Source: bt.tableName, PrimaryKey: false, Nullable: true, DatabaseSource: bt.db.Name()}, } if !bt.remote { diff --git a/go/libraries/doltcore/sqle/dtables/log_table.go b/go/libraries/doltcore/sqle/dtables/log_table.go index 2757bec49e..6a6450c778 100644 --- a/go/libraries/doltcore/sqle/dtables/log_table.go +++ b/go/libraries/doltcore/sqle/dtables/log_table.go @@ -90,7 +90,7 @@ func (dt *LogTable) Schema() sql.Schema { {Name: "commit_hash", Type: types.Text, Source: dt.tableName, PrimaryKey: true, DatabaseSource: dt.dbName}, {Name: "committer", Type: types.Text, Source: dt.tableName, PrimaryKey: false, DatabaseSource: dt.dbName}, {Name: "email", Type: types.Text, Source: dt.tableName, PrimaryKey: false, DatabaseSource: dt.dbName}, - {Name: "date", Type: types.Datetime, Source: dt.tableName, PrimaryKey: false, DatabaseSource: dt.dbName}, + {Name: "date", Type: types.Datetime3, Source: dt.tableName, PrimaryKey: false, DatabaseSource: dt.dbName}, {Name: "message", Type: types.Text, Source: dt.tableName, PrimaryKey: false, DatabaseSource: dt.dbName}, {Name: "commit_order", Type: types.Uint64, Source: dt.tableName, PrimaryKey: false, DatabaseSource: dt.dbName}, } diff --git a/go/libraries/doltcore/sqle/sqlselect_test.go b/go/libraries/doltcore/sqle/sqlselect_test.go index ea532fbcb3..3c30e46f1c 100644 --- a/go/libraries/doltcore/sqle/sqlselect_test.go +++ b/go/libraries/doltcore/sqle/sqlselect_test.go @@ -759,7 +759,7 @@ func BasicSelectTests() []SelectTest { &sql.Column{Name: "commit_hash", Type: gmstypes.Text}, &sql.Column{Name: "committer", Type: gmstypes.Text}, &sql.Column{Name: "email", Type: gmstypes.Text}, - &sql.Column{Name: "date", Type: gmstypes.Datetime}, + &sql.Column{Name: "date", Type: gmstypes.Datetime3}, &sql.Column{Name: "message", Type: gmstypes.Text}, &sql.Column{Name: "commit_order", Type: gmstypes.Uint64}, }, From 2ff68bb99c28855a7db62bddce02273ea68ffc14 Mon Sep 17 00:00:00 2001 From: angelamayxie Date: Tue, 2 Dec 2025 16:20:30 -0800 Subject: [PATCH 4/6] update datetime type in log table function test --- go/libraries/doltcore/sqle/enginetest/dolt_queries.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/libraries/doltcore/sqle/enginetest/dolt_queries.go b/go/libraries/doltcore/sqle/enginetest/dolt_queries.go index d33ca9ba84..8fcd279daa 100644 --- a/go/libraries/doltcore/sqle/enginetest/dolt_queries.go +++ b/go/libraries/doltcore/sqle/enginetest/dolt_queries.go @@ -5324,7 +5324,7 @@ var LogTableFunctionScriptTests = []queries.ScriptTest{ {"commit_hash", "text", "NO", "PRI", nil, ""}, {"committer", "text", "NO", "", nil, ""}, {"email", "text", "NO", "", nil, ""}, - {"date", "datetime", "NO", "", nil, ""}, + {"date", "datetime(3)", "NO", "", nil, ""}, {"message", "text", "NO", "", nil, ""}, {"commit_order", "bigint unsigned", "NO", "", nil, ""}, }, From d14588ffda2e27806269868653997946bd50afea Mon Sep 17 00:00:00 2001 From: angelamayxie Date: Wed, 3 Dec 2025 15:39:27 -0800 Subject: [PATCH 5/6] update datetime type --- go/libraries/doltcore/sqle/dtables/commits_table.go | 2 +- go/libraries/doltcore/sqle/history_table.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go/libraries/doltcore/sqle/dtables/commits_table.go b/go/libraries/doltcore/sqle/dtables/commits_table.go index 8528d06100..d9eeb8591c 100644 --- a/go/libraries/doltcore/sqle/dtables/commits_table.go +++ b/go/libraries/doltcore/sqle/dtables/commits_table.go @@ -76,7 +76,7 @@ func (ct *CommitsTable) Schema() sql.Schema { {Name: "commit_hash", Type: types.Text, Source: ct.tableName, PrimaryKey: true, DatabaseSource: ct.dbName}, {Name: "committer", Type: types.Text, Source: ct.tableName, PrimaryKey: false, DatabaseSource: ct.dbName}, {Name: "email", Type: types.Text, Source: ct.tableName, PrimaryKey: false, DatabaseSource: ct.dbName}, - {Name: "date", Type: types.Datetime, Source: ct.tableName, PrimaryKey: false, DatabaseSource: ct.dbName}, + {Name: "date", Type: types.Datetime3, Source: ct.tableName, PrimaryKey: false, DatabaseSource: ct.dbName}, {Name: "message", Type: types.Text, Source: ct.tableName, PrimaryKey: false, DatabaseSource: ct.dbName}, } } diff --git a/go/libraries/doltcore/sqle/history_table.go b/go/libraries/doltcore/sqle/history_table.go index 3dd9dc6ee3..8303a35a61 100644 --- a/go/libraries/doltcore/sqle/history_table.go +++ b/go/libraries/doltcore/sqle/history_table.go @@ -95,7 +95,7 @@ func (ht *HistoryTable) PrimaryKeySchema() sql.PrimaryKeySchema { &sql.Column{ Name: CommitDateCol, Source: tableName, - Type: types.Datetime, + Type: types.Datetime3, }, ) return newSch @@ -209,7 +209,7 @@ func historyTableSchema(tableName string, table *DoltTable) sql.Schema { &sql.Column{ Name: CommitDateCol, Source: tableName, - Type: types.Datetime, + Type: types.Datetime3, }, ) return newSch @@ -409,7 +409,7 @@ func (ht *HistoryTable) Schema() sql.Schema { projectedSch[i] = &sql.Column{ Name: CommitDateCol, Source: ht.Name(), - Type: types.Datetime, + Type: types.Datetime3, } } else { panic("column not found") From e896f3515b17212bec5793f903d1d1c792e71a18 Mon Sep 17 00:00:00 2001 From: angelamayxie Date: Thu, 4 Dec 2025 14:31:47 -0800 Subject: [PATCH 6/6] update datetime precision for tags and branch activity --- go/libraries/doltcore/sqle/dtables/branch_activity_table.go | 6 +++--- go/libraries/doltcore/sqle/dtables/tags_table.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go/libraries/doltcore/sqle/dtables/branch_activity_table.go b/go/libraries/doltcore/sqle/dtables/branch_activity_table.go index 15b8ef770b..c230170ab3 100644 --- a/go/libraries/doltcore/sqle/dtables/branch_activity_table.go +++ b/go/libraries/doltcore/sqle/dtables/branch_activity_table.go @@ -50,10 +50,10 @@ func (bat *BranchActivityTable) String() string { func (bat *BranchActivityTable) Schema() sql.Schema { return []*sql.Column{ {Name: "branch", Type: types.Text, Source: bat.tableName, PrimaryKey: true, Nullable: false, DatabaseSource: bat.db.Name()}, - {Name: "last_read", Type: types.Datetime, Source: bat.tableName, PrimaryKey: false, Nullable: true, DatabaseSource: bat.db.Name()}, - {Name: "last_write", Type: types.Datetime, Source: bat.tableName, PrimaryKey: false, Nullable: true, DatabaseSource: bat.db.Name()}, + {Name: "last_read", Type: types.DatetimeMaxPrecision, Source: bat.tableName, PrimaryKey: false, Nullable: true, DatabaseSource: bat.db.Name()}, + {Name: "last_write", Type: types.DatetimeMaxPrecision, Source: bat.tableName, PrimaryKey: false, Nullable: true, DatabaseSource: bat.db.Name()}, {Name: "active_sessions", Type: types.Int32, Source: bat.tableName, PrimaryKey: false, Nullable: false, DatabaseSource: bat.db.Name()}, - {Name: "system_start_time", Type: types.Datetime, Source: bat.tableName, PrimaryKey: false, Nullable: false, DatabaseSource: bat.db.Name()}, + {Name: "system_start_time", Type: types.DatetimeMaxPrecision, Source: bat.tableName, PrimaryKey: false, Nullable: false, DatabaseSource: bat.db.Name()}, } } diff --git a/go/libraries/doltcore/sqle/dtables/tags_table.go b/go/libraries/doltcore/sqle/dtables/tags_table.go index 4e42bebb64..c5e73b0762 100644 --- a/go/libraries/doltcore/sqle/dtables/tags_table.go +++ b/go/libraries/doltcore/sqle/dtables/tags_table.go @@ -71,7 +71,7 @@ func (tt *TagsTable) Schema() sql.Schema { {Name: "tag_hash", Type: types.Text, Source: tt.tableName, PrimaryKey: true}, {Name: "tagger", Type: types.Text, Source: tt.tableName, PrimaryKey: false}, {Name: "email", Type: types.Text, Source: tt.tableName, PrimaryKey: false}, - {Name: "date", Type: types.Datetime, Source: tt.tableName, PrimaryKey: false}, + {Name: "date", Type: types.Datetime3, Source: tt.tableName, PrimaryKey: false}, {Name: "message", Type: types.Text, Source: tt.tableName, PrimaryKey: false}, } }