Skip to content

Commit

Permalink
feat(query): enable min/max pushdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Faith Chikwekwe committed Apr 1, 2021
1 parent 4237dda commit 6d5235f
Show file tree
Hide file tree
Showing 8 changed files with 846 additions and 380 deletions.
1 change: 1 addition & 0 deletions cmd/storectl/generate/generate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package generate
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,5 @@ require (
replace github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db => github.com/influxdata/arrow/go/arrow v0.0.0-20200917142114-986e413c1705

replace github.com/nats-io/nats-streaming-server v0.11.2 => github.com/influxdata/nats-streaming-server v0.11.3-0.20201112040610-c277f7560803

replace github.com/influxdata/flux => /Users/faith/code/flux
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e h1:/o3vQt
github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE=
github.com/influxdata/nats-streaming-server v0.11.3-0.20201112040610-c277f7560803 h1:LpaVAM5Www2R7M0GJAxAdL3swBvmna8Pyzw6F7o+j04=
github.com/influxdata/nats-streaming-server v0.11.3-0.20201112040610-c277f7560803/go.mod h1:qgAMR6M9EokX+R5X7jUQfubwBdS1tBIl4yVJ3shhcWk=
github.com/influxdata/pkg-config v0.2.5/go.mod h1:EMS7Ll0S4qkzDk53XS3Z72/egBsPInt+BeRxb0WeSwk=
github.com/influxdata/pkg-config v0.2.6 h1:GQFKw3m3OmmPMze9n75ZVVtNu4LJ2MJolHbxvg4AAvg=
github.com/influxdata/pkg-config v0.2.6/go.mod h1:EMS7Ll0S4qkzDk53XS3Z72/egBsPInt+BeRxb0WeSwk=
github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8=
Expand Down
23 changes: 23 additions & 0 deletions query/stdlib/influxdata/influxdb/min_max_influxdb_test.flux
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package influxdb_test

import "testing/expect"

option now = () => (2030-01-01T00:00:00Z)

testcase push_down_min_bare extends "flux/planner/group_min_test" {
expect.planner(rules: [
"PushDownGroupAggregateRule": 1,
"PushDownRangeRule": 1,
"PushDownFilterRule": 1,
])
group_min_test.group_min_bare()
}

testcase push_down_max_bare extends "flux/planner/group_max_test" {
expect.planner(rules: [
"PushDownGroupAggregateRule": 1,
"PushDownRangeRule": 1,
"PushDownFilterRule": 1,
])
group_max_test.group_max_bare()
}
2 changes: 1 addition & 1 deletion query/stdlib/influxdata/influxdb/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func init() {
PushDownWindowAggregateByTimeRule{},
PushDownBareAggregateRule{},
GroupWindowAggregateTransposeRule{},
// PushDownGroupAggregateRule{},
PushDownGroupAggregateRule{},
)
plan.RegisterLogicalRules(
MergeFiltersRule{},
Expand Down
Loading

0 comments on commit 6d5235f

Please sign in to comment.