Commit Graph

17 Commits (e9689b7269bc219bd75a1d3a51770de257b2c8e8)

Author SHA1 Message Date
Yiqun (Ethan) Zhang 5333ff4d1b
feat(transpiler): support difference(), group by wildcard, and correc… (#17021)
* feat(transpiler): support difference(), stddev(), spread(), group by wildcard, and correct _time column
2020-03-06 11:19:46 -05:00
Nathaniel Cook 11a4b911b0 fix(query/influxql): use explicit mergeKey parameter 2019-07-03 09:48:31 -06:00
Jonathan A. Sternberg 8b20b52f51
refactor(query/influxql): modify the transpiler interface to produce an AST (#11662)
This refactors everything to generate and use a flux AST when
transpiling an influxql query. This also updates the spectests so they
use flux instead of writing out the AST and compare the resulting
AST's.
2019-02-06 10:18:33 -06:00
Lorenzo Affetti ce00375298 refactor(query/stlib): move from implementation from Flux 2019-02-05 17:46:46 +01:00
Nathaniel Cook 1708a41fa7 refactor: update query functions for Flux builtins 2019-01-11 13:11:57 -07:00
Christopher M. Wolff f1d21b8132
refactor(query): update transpiler to reflect signature change to `group()` (#1689)
update other modules that used old syntax as well
2018-12-04 09:32:37 -08:00
Nathaniel Cook 9fecaa0eb0 chore: Update for Flux renaming 2018-11-05 19:30:22 -07:00
Nathaniel Cook 2a1d76eb2d chore: Update flux dependency for the type-inference changes 2018-10-31 17:11:11 -06:00
Adam 195eb04350
Chore/move from function to platform (#1013)
* moved execution code for from into query/functions/inputs

* rebase with master, disable buckets accessed test
2018-10-09 20:36:41 -04:00
Adam 58f4e9fc0b
Refactor Platform according to new organization in `flux` (#966)
We reorganized the functions in flux to have the structure:
/functions
/inputs
/transformations
/outputs
this PR catches up platform to work with the new package layout.

As a separate refactoring issue, we should discuss:

from(bucket: ) should migrate from flux --> platform
to_http and to_kafka should migrate from platform --> flux
2018-10-05 00:06:14 -04:00
Jonathan A. Sternberg dfc32d2635 feat(query/influxql): normalize the time for all aggregate queries
The transpiler will normalize the `_time` column by dropping any
existing time column and then duplicating `_start` when the query is an
aggregate type.

This works for the selectors because they did not normalize their
`_time` column at all and, while the aggregates did normalize their
`_time` column, we have made the decision to remove that functionality
and have aggregates not set a `_time` column at all.
2018-09-12 16:25:51 -05:00
Stuart Carnie ac75af2f58 refactor: Migrate query package to influxdata/flux repository 2018-09-06 11:13:48 -07:00
Jonathan A. Sternberg c94fc4d799 fix(query/influxql): include default parameters in the range spec 2018-07-31 12:53:34 -05:00
Adam a84c86b06d
Fix initial transpiler grouping so that aggregates will compute (#460)
* feat(query/influxql): Fix initial transpiler grouping so that aggregates will compute

 --update spec

 --add mean test to demonstrate new feature
2018-07-25 17:56:33 -04:00
Jonathan A. Sternberg 4b7bfb21c2 fix(query/influxql): influxql transpiler should set the now time
The now time is stamped by the influxql transpiler and used inside of
the actual query. It will result in more accuracy if we take the
timestamp we have created and send it as part of the spec to queryd
rather than force ourselves to ensure absolute times exist everywhere.
2018-07-25 08:34:41 -05:00
Nathaniel Cook d568d7fd01 feat: Use DBRPMappings in 1.x read path 2018-07-18 09:46:57 -06:00
Jonathan A. Sternberg f694fa9637 refactor(query/influxql): move transpiler spec tests to its own package
The package contains all of the transpiler specs and allows them to be
put into different files instead of keeping all of the tests in the same
file. They are all Go code so they are type checked rather than being
loaded as JSON from disk.

Additionally, to make it easier for a developer, the tests will report
the exact file and line where the test was created. So rather than
hunting for which file a test is located in, you will get something nice
like the following:

    --- FAIL: TestTranspiler/SELECT_count(value)_FROM_db0..cpu_WHERE_host_=_'server01' (0.00s)
        testing.go:51: aggregates_with_condition.go:16: unexpected error: unimplemented function: "count"

As can be seen, the test that failed can be found in the
`aggregates_with_condition.go` file at line 16 which is where the test
was created by the `AggregateTest` function and the relevant spec can be
found in that same file.
2018-07-06 12:12:08 -05:00