Skip to content

Commit a036e3a

Browse files
authored
Merge pull request #1951 from dolthub/angela/bump
[no-release-notes] Override IsValidFloat function in gms
2 parents b36ab9b + 504c130 commit a036e3a

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

core/init.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import (
2121
"github.com/dolthub/doltgresql/core/conflicts"
2222
"github.com/dolthub/doltgresql/core/id"
2323
"github.com/dolthub/doltgresql/server/plpgsql"
24+
25+
gmstypes "github.com/dolthub/go-mysql-server/sql/types"
2426
)
2527

2628
// Init initializes this package.
@@ -29,6 +31,7 @@ func Init() {
2931
doltdb.NewRootValue = newRootValue
3032
types.DoltgresRootValueHumanReadableStringAtIndentationLevel = rootValueHumanReadableStringAtIndentationLevel
3133
types.DoltgresRootValueWalkAddrs = rootValueWalkAddrs
34+
gmstypes.IsValidFloat = isValidFloat
3235
conflicts.ClearContextValues = ClearContextValues
3336
plpgsql.GetTypesCollectionFromContext = GetTypesCollectionFromContext
3437
id.RegisterListener(sequenceIDListener{}, id.Section_Table)

core/override_functions.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ func newRootValue(ctx context.Context, vrw types.ValueReadWriter, ns tree.NodeSt
9797
return &RootValue{vrw, ns, st, nil, hash.Hash{}}, nil
9898
}
9999

100+
// isValidFloat replaces the IsValidFloat function in go-mysql-server since gms does not allow NaN and infinity values
101+
// while Doltgres does
102+
func isValidFloat(f float64) bool {
103+
return true
104+
}
105+
100106
// rootValueHumanReadableStringAtIndentationLevel is Doltgres' implementation of
101107
// types.DoltgresRootValueHumanReadableStringAtIndentationLevel.
102108
func rootValueHumanReadableStringAtIndentationLevel(sm types.SerialMessage, level int) string {

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ require (
99
github.com/dolthub/dolt/go v0.40.5-0.20250923175150-9d9f7d8c96ce
1010
github.com/dolthub/eventsapi_schema v0.0.0-20250915094920-eadfd39051ca
1111
github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2
12-
github.com/dolthub/go-mysql-server v0.20.1-0.20250924230334-0afe2a95c29f
12+
github.com/dolthub/go-mysql-server v0.20.1-0.20251016194931-44f3d601e939
1313
github.com/dolthub/sqllogictest/go v0.0.0-20240618184124-ca47f9354216
14-
github.com/dolthub/vitess v0.0.0-20250924141028-c81f2df5db32
14+
github.com/dolthub/vitess v0.0.0-20250930230441-70c2c6a98e33
1515
github.com/fatih/color v1.13.0
1616
github.com/goccy/go-json v0.10.2
1717
github.com/gogo/protobuf v1.3.2

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ github.com/dolthub/fslock v0.0.3 h1:iLMpUIvJKMKm92+N1fmHVdxJP5NdyDK5bK7z7Ba2s2U=
258258
github.com/dolthub/fslock v0.0.3/go.mod h1:QWql+P17oAAMLnL4HGB5tiovtDuAjdDTPbuqx7bYfa0=
259259
github.com/dolthub/go-icu-regex v0.0.0-20250916051405-78a38d478790 h1:zxMsH7RLiG+dlZ/y0LgJHTV26XoiSJcuWq+em6t6VVc=
260260
github.com/dolthub/go-icu-regex v0.0.0-20250916051405-78a38d478790/go.mod h1:F3cnm+vMRK1HaU6+rNqQrOCyR03HHhR1GWG2gnPOqaE=
261-
github.com/dolthub/go-mysql-server v0.20.1-0.20250924230334-0afe2a95c29f h1:e/Jm0MwHCgpg5G0l+JUEEr1mpvQA8vLL4X6vieFYBd4=
262-
github.com/dolthub/go-mysql-server v0.20.1-0.20250924230334-0afe2a95c29f/go.mod h1:sNJMEGupPyeoGtzro/f6rUFhhanZ2PccmfuvqnCPI3k=
261+
github.com/dolthub/go-mysql-server v0.20.1-0.20251016194931-44f3d601e939 h1:b4P07cjKVBpovxo5oyPMex97HGe/Ahuf8LWKi+LaGhU=
262+
github.com/dolthub/go-mysql-server v0.20.1-0.20251016194931-44f3d601e939/go.mod h1:EeYR0apo+8j2Dyxmn2ghkPlirO2S5mT1xHBrA+Efys8=
263263
github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63 h1:OAsXLAPL4du6tfbBgK0xXHZkOlos63RdKYS3Sgw/dfI=
264264
github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63/go.mod h1:lV7lUeuDhH5thVGDCKXbatwKy2KW80L4rMT46n+Y2/Q=
265265
github.com/dolthub/ishell v0.0.0-20240701202509-2b217167d718 h1:lT7hE5k+0nkBdj/1UOSFwjWpNxf+LCApbRHgnCA17XE=
@@ -270,8 +270,8 @@ github.com/dolthub/pg_query_go/v6 v6.0.0-20250702135351-29eb6bfc4ea6 h1:UEX3FGaC
270270
github.com/dolthub/pg_query_go/v6 v6.0.0-20250702135351-29eb6bfc4ea6/go.mod h1:nvTHIuoud6e1SfrUaFwHqT0i4b5Nr+1rPWVds3B5+50=
271271
github.com/dolthub/sqllogictest/go v0.0.0-20240618184124-ca47f9354216 h1:JWkKRE4EHUcEVQCMRBej8DYxjYjRz/9MdF/NNQh0o70=
272272
github.com/dolthub/sqllogictest/go v0.0.0-20240618184124-ca47f9354216/go.mod h1:e/FIZVvT2IR53HBCAo41NjqgtEnjMJGKca3Y/dAmZaA=
273-
github.com/dolthub/vitess v0.0.0-20250924141028-c81f2df5db32 h1:VvJIKIxqerl/12Z9zndDidUSWejER1/sBPZMaJp06Jo=
274-
github.com/dolthub/vitess v0.0.0-20250924141028-c81f2df5db32/go.mod h1:8pvvk5OLaLN9LLxghyczUapn/97l+mBgIb10qC1LG84=
273+
github.com/dolthub/vitess v0.0.0-20250930230441-70c2c6a98e33 h1:ScHTwNbcVC6JH1OSyXzj8S4w67BIpRXwTSjrac3/PSw=
274+
github.com/dolthub/vitess v0.0.0-20250930230441-70c2c6a98e33/go.mod h1:8pvvk5OLaLN9LLxghyczUapn/97l+mBgIb10qC1LG84=
275275
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
276276
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
277277
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=

0 commit comments

Comments
 (0)