diff --git a/go.mod b/go.mod index 927c1ea..43ec609 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/hashicorp/raft v1.3.11 github.com/hashicorp/raft-boltdb/v2 v2.2.2 github.com/influxdata/flux v0.65.1 - github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385 + github.com/influxdata/influxql v1.2.0 github.com/influxdata/pkg-config v0.2.11 github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6 github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368 @@ -119,4 +119,4 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -replace github.com/influxdata/influxql => github.com/influxtsdb/influxql v1.1.1-0.20220918111639-aa1802d18d78 +replace github.com/influxdata/influxql => github.com/influxtsdb/influxql v1.1.1-0.20240810101344-3240ba2d3b01 diff --git a/go.sum b/go.sum index 779c624..7768a70 100644 --- a/go.sum +++ b/go.sum @@ -294,8 +294,8 @@ github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b h1:i44CesU68Z github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b/go.mod h1:Z0kXnxzbTC2qrx4NaIzYkE1k66+6oEDQTvL95hQFh5Y= github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368 h1:+TUUmaFa4YD1Q+7bH9o5NCHQGPMqZCYJiNW6lIIS9z4= github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= -github.com/influxtsdb/influxql v1.1.1-0.20220918111639-aa1802d18d78 h1:t+2gF53w+YJ64tO9LAn2FKt4SkoyV0Or+6vqnh1/nxw= -github.com/influxtsdb/influxql v1.1.1-0.20220918111639-aa1802d18d78/go.mod h1:G79plbe6zxyKLhDgtKONDyBrbqqtNH2S4KBOpIs9sFk= +github.com/influxtsdb/influxql v1.1.1-0.20240810101344-3240ba2d3b01 h1:TjPKTbhsXKwYW/VHwJnjkkDRFPLORkuhYm0qqhI1e7w= +github.com/influxtsdb/influxql v1.1.1-0.20240810101344-3240ba2d3b01/go.mod h1:Yvn3qhVADvCGkXCggTQQ020meAG9W79AcYsstl21DX0= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= diff --git a/query/compile_test.go b/query/compile_test.go index 6c3ebde..9fb2730 100644 --- a/query/compile_test.go +++ b/query/compile_test.go @@ -166,13 +166,13 @@ func TestCompile_Failures(t *testing.T) { {s: `SELECT top(value) FROM cpu`, err: `invalid number of arguments for top, expected at least 2, got 1`}, {s: `SELECT top('unexpected', 5) FROM cpu`, err: `expected first argument to be a field in top(), found 'unexpected'`}, {s: `SELECT top(value, 'unexpected', 5) FROM cpu`, err: `only fields or tags are allowed in top(), found 'unexpected'`}, - {s: `SELECT top(value, 2.5) FROM cpu`, err: `expected integer as last argument in top(), found 2.500`}, + {s: `SELECT top(value, 2.5) FROM cpu`, err: `expected integer as last argument in top(), found 2.5`}, {s: `SELECT top(value, -1) FROM cpu`, err: `limit (-1) in top function must be at least 1`}, {s: `SELECT top(value, 3) FROM cpu LIMIT 2`, err: `limit (3) in top function can not be larger than the LIMIT (2) in the select statement`}, {s: `SELECT bottom(value) FROM cpu`, err: `invalid number of arguments for bottom, expected at least 2, got 1`}, {s: `SELECT bottom('unexpected', 5) FROM cpu`, err: `expected first argument to be a field in bottom(), found 'unexpected'`}, {s: `SELECT bottom(value, 'unexpected', 5) FROM cpu`, err: `only fields or tags are allowed in bottom(), found 'unexpected'`}, - {s: `SELECT bottom(value, 2.5) FROM cpu`, err: `expected integer as last argument in bottom(), found 2.500`}, + {s: `SELECT bottom(value, 2.5) FROM cpu`, err: `expected integer as last argument in bottom(), found 2.5`}, {s: `SELECT bottom(value, -1) FROM cpu`, err: `limit (-1) in bottom function must be at least 1`}, {s: `SELECT bottom(value, 3) FROM cpu LIMIT 2`, err: `limit (3) in bottom function can not be larger than the LIMIT (2) in the select statement`}, // TODO(jsternberg): This query is wrong, but we cannot enforce this because of previous behavior: https://github.com/influxdata/influxdb/pull/8771 diff --git a/services/storage/predicate_test.go b/services/storage/predicate_test.go index 26b9ddd..d03e234 100644 --- a/services/storage/predicate_test.go +++ b/services/storage/predicate_test.go @@ -103,7 +103,7 @@ func TestRewriteExprRemoveFieldKeyAndValue(t *testing.T) { expr, err := reads.NodeToExpr(node, nil) assert.NoError(t, err, "NodeToExpr failed") - assert.Equal(t, expr.String(), `host::tag = 'host1' AND _field::tag =~ /^us-west/ AND "$" = 0.500`) + assert.Equal(t, expr.String(), `host::tag = 'host1' AND _field::tag =~ /^us-west/ AND "$" = 0.5`) expr = storage.RewriteExprRemoveFieldKeyAndValue(expr) assert.Equal(t, expr.String(), `host::tag = 'host1' AND true AND true`)