mirror of
https://github.com/dolthub/dolt.git
synced 2026-04-28 04:28:53 -05:00
Merge pull request #10084 from dolthub/angela/date_functions
Dolt bump for gms zeroTime update
This commit is contained in:
@@ -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.20251114214131-16344edab8e2
|
||||
github.com/dolthub/go-mysql-server v0.20.1-0.20251118000818-49b8a44f8309
|
||||
github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63
|
||||
github.com/edsrzf/mmap-go v1.2.0
|
||||
github.com/esote/minmaxheap v1.0.0
|
||||
|
||||
@@ -195,8 +195,8 @@ 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.20251114214131-16344edab8e2 h1:ODaw/BUzhvNhHjcDFCmsMIBrnFnRJX19O78Z9kJ+M6g=
|
||||
github.com/dolthub/go-mysql-server v0.20.1-0.20251114214131-16344edab8e2/go.mod h1:HTOKSMPJWcbSgCe1DksDgNPlZyZP1usV+EoA7Utax+A=
|
||||
github.com/dolthub/go-mysql-server v0.20.1-0.20251118000818-49b8a44f8309 h1:APW9EVL+VaPQnxgTr1GF9+/c30zLNGt7A4dKRkgkcyE=
|
||||
github.com/dolthub/go-mysql-server v0.20.1-0.20251118000818-49b8a44f8309/go.mod h1:HTOKSMPJWcbSgCe1DksDgNPlZyZP1usV+EoA7Utax+A=
|
||||
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=
|
||||
|
||||
@@ -24,6 +24,7 @@ import (
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
"github.com/dolthub/go-mysql-server/sql/types"
|
||||
querypb "github.com/dolthub/vitess/go/vt/proto/query"
|
||||
"github.com/shopspring/decimal"
|
||||
|
||||
@@ -577,10 +578,14 @@ func readDate(val []byte) (date time.Time) {
|
||||
|
||||
func writeDate(buf []byte, val time.Time) {
|
||||
expectSize(buf, dateSize)
|
||||
t := uint32(val.Year() << yearShift)
|
||||
t += uint32(val.Month() << monthShift)
|
||||
t += uint32(val.Day())
|
||||
writeUint32(buf, t)
|
||||
if val.Equal(types.ZeroTime) {
|
||||
writeUint32(buf, 0)
|
||||
} else {
|
||||
t := uint32(val.Year() << yearShift)
|
||||
t += uint32(val.Month() << monthShift)
|
||||
t += uint32(val.Day())
|
||||
writeUint32(buf, t)
|
||||
}
|
||||
}
|
||||
|
||||
func compareDate(l, r time.Time) int {
|
||||
|
||||
Reference in New Issue
Block a user