Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: promote algorithm W to master #17900

Merged
merged 106 commits into from
May 27, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
0f3aabc
refactor(query): let influxdb build against algo-w branch (#16673)
Jan 24, 2020
2bc8d49
chore(go.mod): update go.mod to point at latest flux@feat/use-algo-w
Jan 31, 2020
d25c56c
chore: merge commit 'e472b013d93d' into feat/use-algo-w
Feb 10, 2020
337595c
chore: update to latest flux@feat/use-algo-w
Feb 10, 2020
2e073fd
chore: update to latest flux@feat/use-algo-w
Feb 11, 2020
d676696
test(query): skip tests that are not passing in feat/use-algo-w (#16813)
Feb 11, 2020
16fc8df
build: remove -tags libflux and FLUX_PARSER_TYPE from build and circl…
Feb 19, 2020
766aa23
chore: update flux dependency
Feb 21, 2020
b01e194
chore: update flux dependency in promqltests
Feb 21, 2020
2c184ea
chore: update flux dependency and unskip notification tests
Feb 21, 2020
935180e
refactor: update flux for the runtime package (#17002)
jsternberg Feb 27, 2020
ff848bc
refactor(repl): remove the querier from the repl (#17031)
jsternberg Feb 27, 2020
25b0e37
feat: add support for pkg-config (#17036)
jsternberg Feb 28, 2020
0872af8
refactor: update semantic builtin lookups to use runtime now (#17066)
jsternberg Mar 2, 2020
03cfdba
fix(stdlib): unskip flux end to end tests
Mar 2, 2020
a84df74
feat(stdlib): add influxdb source (#17047)
jsternberg Mar 3, 2020
3250fb1
fix(stdlib): update flux dependency and unskip test
Mar 5, 2020
a907e05
refactor(http): modify query handler to use a language service (#17074)
jsternberg Mar 5, 2020
bcbb9df
refactor(task): tasks will now use the flux language service (#17104)
jsternberg Mar 5, 2020
0d6e4e3
Merge branch 'master' into feat/use-algo-w
jsternberg Mar 6, 2020
400d710
refactor(storage/reads): remove the storage dependency on libflux (#1…
jsternberg Mar 7, 2020
8d2ba69
refactor(http): remove the spec and update lang usage (#17148)
jsternberg Mar 9, 2020
4d68385
Merge branch 'master' into feat/use-algo-w
jsternberg Mar 9, 2020
92f121d
fix: change variable name to match new clockface variable names
hoorayimhelping Mar 9, 2020
2374717
refactor(kv): when no session length is set, use the default
jsternberg Mar 9, 2020
7012470
Merge branch 'master' into feat/use-algo-w
jsternberg Mar 10, 2020
07c9a7c
fix(stdlib): unskip stateChanges end to end test
Mar 12, 2020
790661c
test(query/stdlib/influxdata/influxdb): update rules_test to use algo…
Mar 16, 2020
5f30466
feat(query): update buckets and v1.databases calls (#17294)
jsternberg Mar 17, 2020
6c8125b
chore: update flux dependency
Mar 19, 2020
20c2439
refactor(http): change *ast.Package to json.RawMessage in query reque…
Mar 23, 2020
e9689b7
chore: update to latest flux algo-w (#17408)
Mar 24, 2020
e57c28d
chore: update to latest algo-w flux (#17422)
Mar 25, 2020
7d885fb
chore: update flux
Mar 26, 2020
4c5ef96
refactor: add pkg-config package to tools.go (#17493)
jsternberg Mar 30, 2020
469c584
Merge branch 'master' into feat/use-algo-w
jsternberg Apr 3, 2020
4ade845
chore: update flux to latest algow
Apr 3, 2020
27f7f4c
chore: update flux to latest algow
Apr 3, 2020
d3fa609
Merge branch 'master' into chore/merge-master
jsternberg Apr 6, 2020
bf15ba7
chore: update flux to latest algow
Apr 6, 2020
17c244d
chore: fix the promqltests go module file (#17631)
jsternberg Apr 6, 2020
1bb08ce
refactor(query/stdlib): modify storage filters to use the predicate d…
jsternberg Apr 7, 2020
687ab70
refactor(query): update semantic graph usage for function expression …
jsternberg Apr 7, 2020
5c99219
chore: update flux to latest algow
Apr 14, 2020
b9df72c
chore: update flux to latest algow
Apr 14, 2020
7541af8
chore: merge master into algow
Apr 15, 2020
0bac09d
Merge pull request #17759 from influxdata/chore/merge-master
Apr 15, 2020
90fb754
Merge branch 'master' into chore/merge-master
Apr 16, 2020
8e098b5
Merge pull request #17777 from influxdata/chore/merge-master
Apr 16, 2020
9857ae1
feat: release a nightly image of algow
Apr 16, 2020
9c67148
chore: update flux to latest algow revision
Apr 20, 2020
335968a
Merge branch 'master' into chore/merge-master
Apr 20, 2020
e076b61
fix: planner rewrite rules take a context
Apr 20, 2020
34bcbd8
Merge pull request #17807 from influxdata/chore/merge-master
Apr 20, 2020
63fd365
Merge branch 'master' into chore/merge-master-into-algo-w
Apr 22, 2020
54ac783
refactor(query): move ReadWindowAggregateSpec to query package
Apr 22, 2020
c6ffeac
test: skip flux end to end test for writing null values
Apr 22, 2020
ff2a2cc
chore: update flux to latest algo-w revision
Apr 23, 2020
d60b877
Merge branch 'master' into chore/merge-master-into-algo-w
Apr 23, 2020
77fb838
Merge pull request #17848 from influxdata/chore/merge-master-into-algo-w
Apr 23, 2020
3079d2a
Merge branch 'master' into chore/merge-master-into-algo-w
Apr 24, 2020
3f4368d
chore: update flux to latest algo-w revision
Apr 24, 2020
40398b7
Merge pull request #17867 from influxdata/chore/merge-master-into-algo-w
Apr 24, 2020
f5cf024
chore: update flux to latest algo-w revision
Apr 28, 2020
457637e
Merge branch 'master' into chore/merge-master
Apr 28, 2020
d6b4728
Merge pull request #17884 from influxdata/chore/merge-master
Apr 28, 2020
6d885c7
Merge branch 'master' into chore/update-flux
Apr 29, 2020
f2478a1
chore: update flux to latest revision
Apr 29, 2020
4884f71
Merge pull request #17904 from influxdata/chore/update-flux
Apr 29, 2020
2ef9999
Merge branch 'master' into chore/merge-master
Apr 30, 2020
1db0fcc
Merge pull request #17920 from influxdata/chore/merge-master
Apr 30, 2020
83b90c3
Merge branch 'master' into chore/merge-master
Apr 30, 2020
4fba49f
Merge pull request #17925 from influxdata/chore/merge-master
Apr 30, 2020
22c7d09
feat: frontend consumption of feature flags (#17926)
drdelambre Apr 30, 2020
2b58cbf
fix: safari rendering bug in checks (#17929)
drdelambre May 1, 2020
aac3a4e
fix: show buckets in alerting (#17930)
drdelambre May 1, 2020
89e3436
feat(pkger): add the ability to remove a stack and all its associated…
jsteenb2 May 1, 2020
28aa464
chore(httpc): refactor inputs to eliminate required path
jsteenb2 May 2, 2020
ffddeb4
fix(zero_value_checks): checks can now have a value set to 0 (#17933)
asalem1 May 4, 2020
1d027cf
feat(pkger): enforce metadata.name dns name compliance
jsteenb2 May 3, 2020
8bb5065
refactor: unify WindowAggregateCapability (#17901)
ethanyzhang May 5, 2020
e341a51
fix: fmt
ethanyzhang May 5, 2020
7c1b735
Merge branch 'master' into chore/update-flux
May 5, 2020
02c8e02
chore: update flux to latest revision
May 5, 2020
2faac6a
Merge pull request #17962 from influxdata/chore/update-flux
May 5, 2020
7cb599c
feat(storage): convert ResultSet to table stream for aggregate window
May 4, 2020
e51a2b8
feat: added PushDownWindowAggregate planner rewrite rule (#17898)
adrian-thurston May 6, 2020
6dd385d
chore: update flux to latest revision
May 6, 2020
4aec0dc
Merge branch 'master' into chore/update-flux
May 6, 2020
c380ff6
Merge pull request #17974 from influxdata/chore/update-flux
May 6, 2020
f3320c7
Merge branch 'master' into chore/update-flux
May 7, 2020
9a1e31a
chore: update flux to latest revision
May 7, 2020
8bf2d34
Merge pull request #18002 from influxdata/chore/update-flux
May 7, 2020
7379e78
fix(storage/flux): fix a race condition in the tags cache (#17977)
jsternberg May 7, 2020
34e581c
Merge branch 'master' into chore/merge-master
May 12, 2020
20a583d
chore: update flux to latest revision
May 12, 2020
2124d84
Merge pull request #18061 from influxdata/chore/merge-master
May 12, 2020
09b8e40
fix(query/stdlib): update to function to use the refactored row funct…
jsternberg May 13, 2020
b43f79b
fix: need to rebuild the query request before the second e2e test run…
adrian-thurston May 15, 2020
342c3c2
fix(query): do not free the column reader in the no content encoders …
jsternberg May 15, 2020
0c8d19e
Merge branch 'master' into feat/use-algo-w
jsternberg May 18, 2020
b776cf4
feat: added PushDownGroupAggregate planner rewrite rule (#18085)
adrian-thurston May 20, 2020
0bb847b
Merge branch 'master' into feat/use-algo-w
jsternberg May 21, 2020
53165bf
feat(query): add a planner rule to push down bare aggregates (#18144)
May 22, 2020
7db9f4c
Merge branch 'master' into chore/merge-master
May 26, 2020
de1b1b3
Merge pull request #18216 from influxdata/chore/merge-master
May 26, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into chore/update-flux
  • Loading branch information
jlapacik committed Apr 29, 2020
commit 6d885c71121bb52286b6b028dcbe75e26b5431f1
14 changes: 7 additions & 7 deletions mock/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ import (
"github.com/influxdata/influxdb/v2/query"
)

type StoreReader struct {
type StorageReader struct {
ReadFilterFn func(ctx context.Context, spec query.ReadFilterSpec, alloc *memory.Allocator) (query.TableIterator, error)
ReadGroupFn func(ctx context.Context, spec query.ReadGroupSpec, alloc *memory.Allocator) (query.TableIterator, error)
ReadTagKeysFn func(ctx context.Context, spec query.ReadTagKeysSpec, alloc *memory.Allocator) (query.TableIterator, error)
ReadTagValuesFn func(ctx context.Context, spec query.ReadTagValuesSpec, alloc *memory.Allocator) (query.TableIterator, error)
CloseFn func()
}

func (s *StoreReader) ReadFilter(ctx context.Context, spec query.ReadFilterSpec, alloc *memory.Allocator) (query.TableIterator, error) {
func (s *StorageReader) ReadFilter(ctx context.Context, spec query.ReadFilterSpec, alloc *memory.Allocator) (query.TableIterator, error) {
return s.ReadFilterFn(ctx, spec, alloc)
}

func (s *StoreReader) ReadGroup(ctx context.Context, spec query.ReadGroupSpec, alloc *memory.Allocator) (query.TableIterator, error) {
func (s *StorageReader) ReadGroup(ctx context.Context, spec query.ReadGroupSpec, alloc *memory.Allocator) (query.TableIterator, error) {
return s.ReadGroupFn(ctx, spec, alloc)
}

func (s *StoreReader) ReadTagKeys(ctx context.Context, spec query.ReadTagKeysSpec, alloc *memory.Allocator) (query.TableIterator, error) {
func (s *StorageReader) ReadTagKeys(ctx context.Context, spec query.ReadTagKeysSpec, alloc *memory.Allocator) (query.TableIterator, error) {
return s.ReadTagKeysFn(ctx, spec, alloc)
}

func (s *StoreReader) ReadTagValues(ctx context.Context, spec query.ReadTagValuesSpec, alloc *memory.Allocator) (query.TableIterator, error) {
func (s *StorageReader) ReadTagValues(ctx context.Context, spec query.ReadTagValuesSpec, alloc *memory.Allocator) (query.TableIterator, error) {
return s.ReadTagValuesFn(ctx, spec, alloc)
}

Expand All @@ -41,12 +41,12 @@ func (s *StorageReader) Close() {
}

type WindowAggregateStoreReader struct {
*StoreReader
*StorageReader
HasWindowAggregateCapabilityFn func(ctx context.Context) bool
ReadWindowAggregateFn func(ctx context.Context, spec query.ReadWindowAggregateSpec, alloc *memory.Allocator) (query.TableIterator, error)
}

func (s *WindowAggregateStoreReader) HasWindowAggregateCapability(ctx context.Context, capability ...*influxdb.WindowAggregateCapability) bool {
func (s *WindowAggregateStoreReader) HasWindowAggregateCapability(ctx context.Context, capability ...*query.WindowAggregateCapability) bool {
// Use the function if it exists.
if s.HasWindowAggregateCapabilityFn != nil {
return s.HasWindowAggregateCapabilityFn(ctx)
Expand Down
2 changes: 1 addition & 1 deletion query/stdlib/influxdata/influxdb/operators.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ type ReadWindowAggregatePhysSpec struct {
ReadRangePhysSpec

WindowEvery int64
Aggregates []string
Aggregates []plan.ProcedureKind
}

func (s *ReadWindowAggregatePhysSpec) Kind() plan.ProcedureKind {
Expand Down
2 changes: 1 addition & 1 deletion query/stdlib/influxdata/influxdb/source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func TestReadWindowAggregateSource(t *testing.T) {
BucketID: bucketID.String(),
},
WindowEvery: 10,
Aggregates: []string{
Aggregates: []plan.ProcedureKind{
universe.SumKind,
},
}
Expand Down
7 changes: 6 additions & 1 deletion query/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,15 @@ type StorageReader interface {
Close()
}

// WindowAggregateCapability describes what is supported by WindowAggregateReader.
type WindowAggregateCapability struct{}

// WindowAggregateReader implements the WindowAggregate capability.
type WindowAggregateReader interface {
// HasWindowAggregateCapability will test if this Reader source supports the ReadWindowAggregate capability.
HasWindowAggregateCapability(ctx context.Context) bool
// If WindowAggregateCapability is passed to the method, then the struct
// is filled with a detailed list of what the RPC call supports.
HasWindowAggregateCapability(ctx context.Context, capability ...*WindowAggregateCapability) bool

// ReadWindowAggregate will read a table using the WindowAggregate method.
ReadWindowAggregate(ctx context.Context, spec ReadWindowAggregateSpec, alloc *memory.Allocator) (TableIterator, error)
Expand Down
54 changes: 31 additions & 23 deletions storage/flux/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,23 @@ func (r *storeReader) ReadGroup(ctx context.Context, spec query.ReadGroupSpec, a
}, nil
}

func (r *storeReader) HasWindowAggregateCapability(ctx context.Context, capability ...*query.WindowAggregateCapability) bool {
if aggStore, ok := r.s.(storage.WindowAggregateStore); ok {
return aggStore.HasWindowAggregateCapability(ctx)
}
return false
}

func (r *storeReader) ReadWindowAggregate(ctx context.Context, spec query.ReadWindowAggregateSpec, alloc *memory.Allocator) (query.TableIterator, error) {
return &windowAggregateIterator{
ctx: ctx,
s: r.s,
spec: spec,
cache: newTagsCache(0),
alloc: alloc,
}, nil
}

func (r *storeReader) ReadTagKeys(ctx context.Context, spec query.ReadTagKeysSpec, alloc *memory.Allocator) (query.TableIterator, error) {
return &tagKeysIterator{
ctx: ctx,
Expand Down Expand Up @@ -495,7 +512,7 @@ func groupKeyForGroup(kv [][]byte, spec *query.ReadGroupSpec, bnds execute.Bound
type windowAggregateIterator struct {
ctx context.Context
s storage.Store
spec influxdb.ReadWindowAggregateSpec
spec query.ReadWindowAggregateSpec
stats cursors.CursorStats
cache *tagsCache
alloc *memory.Allocator
Expand All @@ -515,44 +532,35 @@ func (wai *windowAggregateIterator) Do(f func(flux.Table) error) error {
return err
}

var predicate *datatypes.Predicate
if wai.spec.Predicate != nil {
p, err := toStoragePredicate(wai.spec.Predicate)
if err != nil {
return err
}
predicate = p
}

var req datatypes.ReadWindowAggregateRequest
req.ReadSource = any
req.Predicate = predicate
req.Predicate = wai.spec.Predicate
req.Range.Start = int64(wai.spec.Bounds.Start)
req.Range.End = int64(wai.spec.Bounds.Stop)

req.WindowEvery = wai.spec.WindowEvery
req.Aggregate = make([]*datatypes.Aggregate, len(wai.spec.Aggregates))
for i, aggKind := range wai.spec.Aggregates {
if agg, err := determineAggregateMethod(aggKind); err != nil {
if agg, err := determineAggregateMethod(string(aggKind)); err != nil {
return err
} else if agg != datatypes.AggregateTypeNone {
req.Aggregate[i] = &datatypes.Aggregate{Type: agg}
}
}

if aggStore, ok := wai.s.(storage.WindowAggregateStore); !ok {
return errors.New("storage does not support window aggregate.")
} else {
rs, err := aggStore.WindowAggregate(wai.ctx, &req)
if err != nil {
return err
}
aggStore, ok := wai.s.(storage.WindowAggregateStore)
if !ok {
return errors.New("storage does not support window aggregate")
}
rs, err := aggStore.WindowAggregate(wai.ctx, &req)
if err != nil {
return err
}

if rs == nil {
return nil
}
return wai.handleRead(f, rs)
if rs == nil {
return nil
}
return wai.handleRead(f, rs)
}

func (wai *windowAggregateIterator) handleRead(f func(flux.Table) error, rs storage.ResultSet) error {
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.