Commit Graph

355 Commits (5dd9912d00073d686797dd087974a1e170a18c08)

Author SHA1 Message Date
Nathaniel Cook c6567a9ed1 fix: Fixes panic in query from sharing builtin decls 2018-08-27 13:48:13 -06:00
Jonathan A. Sternberg 22673adee7 fix(query/influxql): disable the join behavior in the transpiler
The behavior needs to be updated so we are goinig to just disable it
temporarily so bad query specs are not generated.
2018-08-27 12:41:53 -05:00
Nathaniel Cook cf072cbd4d fix: Add end to end test for histogramQuantile 2018-08-27 10:15:59 -06:00
Nathaniel Cook a2e7ba3422 Merged pull request #701 from influxdata/nc-builtins
fix: Fix missing builtins in REPL
2018-08-27 09:52:31 -06:00
Nathaniel Cook 61bc6df75b fix: Fix missing builtins in REPL
The REPL's use of the interpreter was causing it to not get the builtins
defined in builtin scripts. For example the `top` function was missing.

This change fixes the issues by ensuring the builtins are only evaluated
once and that there is only one way to get the query Interpreter that is
guaranteed to have the proper builtins.
2018-08-27 09:46:13 -06:00
Adam Perlin 015afb74db
Materialize Empty Windows (#689)
Update window to materialize all windows within bounds
2018-08-24 17:13:31 -07:00
Stuart Carnie cc88c2f608 refactor(pb): Consolidate to use refactored storage APIs from influxdb
* updated influxdata/influxdb:platform vendor dependency
2018-08-24 12:26:45 -07:00
Adam Perlin 302aaee1f5
Bounds Refactor (#675)
* Refactor bounds in planner
2018-08-23 15:58:29 -07:00
Nathaniel Cook 6e9bfacb45 feat: Add histogramQuantile function 2018-08-23 12:46:39 -06:00
Adam Perlin 1051a8d697
Add query examples to flux SPEC (#641)
* Add additional example queries to SPEC.md
2018-08-22 18:39:19 -07:00
jlapacik 178f9d3678 update links to issues in spec 2018-08-22 10:04:21 -07:00
Nathaniel Cook 2c7f6137f1 Merged pull request #665 from influxdata/aa_argNames_fix
chore(query/functions): clean up parameters to be appropriately camel…
2018-08-22 09:53:41 -06:00
Nathaniel Cook 44c3b9b962 fix: Use metadata based gRPC tracing 2018-08-20 15:52:09 -06:00
Adam 3a60e42ce6 chore(query/functions): clean up parameters to be appropriately camel-cased and with completed function signatures 2018-08-20 13:40:49 -04:00
Adam 4b4539934b
feat(query/functions): add pivot() builtin procedure
pivot() implments the ability to flatten a table according to the values in given columns
2018-08-17 16:45:15 -04:00
Adam cc5a625950
spec(query/docs) Update spec and readme for the new Pivot function (#476) 2018-08-17 16:44:29 -04:00
Adam Perlin 840077ca62
Encoding Error Tests (#653)
* Add tests for CSV encoding errors
* Update encoder error checking to use behavior pattern
2018-08-17 13:16:41 -07:00
jlapacik 09de5dbd34 design spec for to function 2018-08-17 12:32:28 -07:00
Adam Perlin 96d11c3d9f
Add Duplicate function (#575)
* Add duplicate schema mutation
2018-08-17 12:12:00 -07:00
Adam Perlin ce6195150a
Account for error from EncodeError call in result.go (#650) 2018-08-16 14:23:17 -07:00
Nathaniel Cook 735b688749 Merged pull request #448 from influxdata/nc-calendars-spec
chore: Specify calendar intervals, windowing and time zone behavior
2018-08-16 15:14:32 -06:00
Adam Perlin 4d9c6c4c39
Add errors as expected output in test framework (#627)
* Add expected error functionality to test framework; Add EncoderError
type to differentiate between encoding and execution errors
2018-08-16 12:01:20 -07:00
Jonathan A. Sternberg 1129552475 feat(query): log panics with their stacktraces within the query executor
The logger is now threaded into the query controller, executor, and the
dispatcher so that we can log panics. They are logged at the info level
because the panics do not result in the system crashing and becoming
unusable.
2018-08-15 16:03:12 -05:00
Nathaniel Cook 9c67dedbb7 add details on add/sub of durations 2018-08-15 13:39:57 -06:00
Adam Perlin 15c9be1809
Add Stream Context to Executor (#609)
Add stream context with bounds to planner/execution engine
2018-08-14 16:18:59 -07:00
Nathaniel Cook d483ac8f0f chore: Specify calendar intervals, windowing and time zone behavior
Durations are changed to be a 3 vector to form a linear basis of
seconds, days, and months.
Interval comprehensions are introduced to be able to define complex
calendar intervals.
Specification is added around time zones.

The window function is update to default to not returning incomplete
windows.
2018-08-14 15:07:03 -06:00
Jonathan A. Sternberg 27c59297bc fix(query/control): fix the queueing metric
We decremented all, but forgot to decrement queueing when it was set and
the query spec could not be validated.
2018-08-14 16:02:46 -05:00
Jonathan A. Sternberg 9f829ae5bf fix(query/control): remove a deadlock
The call to `setErr` would grab a lock that `Pop` used, but `setErr`
requires the controller run loop to be executing for it to work. If we
reverse the order of these calls, it should be fine.
2018-08-14 15:49:15 -05:00
Jonathan A. Sternberg a591f2f90b
Merge pull request #628 from influxdata/js-controller-metrics
fix(query/control): fix controller metrics
2018-08-14 12:31:43 -05:00
Jonathan A. Sternberg 46605ac6b3 fix(query/control): finish the parent span once
When the controller moves to one of the finished states, it will finish
the parent span so that can be recorded. It presently will do this
multiple times when transitioning between different finished states.
2018-08-14 11:45:25 -05:00
Jonathan A. Sternberg f6e5feacbe fix(query/control): finish the parent span if compiling or queueing fails
This normally happens within the finishing states, but when compiling or
queueing fails it never enters those finished states and is instead
discarded. We need to signal that the query itself has finished in the
metrics.
2018-08-14 11:29:34 -05:00
Adam 6329f28064
feat(query/execute): Add Grow() functions to the table builder interface (#549)
* Added GrowXX functions to allocator.go

* Added Grow functions to table builder interface
2018-08-13 20:43:44 -04:00
Jonathan A. Sternberg 3e7a04e887
Merge pull request #624 from influxdata/js-godoc-query-package
docs(query): add package docs for the packages in the query package
2018-08-13 16:07:16 -05:00
Jonathan A. Sternberg c38e68c4b1
Merge pull request #570 from influxdata/js-document-query-control-package
docs(query/control): document the query/control package
2018-08-13 15:56:22 -05:00
Jonathan A. Sternberg a563ab4f34 docs(query/control): document the query/control package
This documents the responsibilities of what the Controller does and is
expected to do. It describes some behaviors that aren't implemented, but
acts as a guide for what the Controller should do as we continue
developing the query engine and improving the internal mechanics.
2018-08-13 15:49:14 -05:00
jlapacik f1e5da8656 add day and week literals to Flux grammar 2018-08-13 13:40:43 -07:00
Jonathan A. Sternberg 73b4b1d0d8 docs(query): add package docs for the packages in the query package 2018-08-13 15:21:02 -05:00
jlapacik 27b2093116 new join implementation
This commit provides a new join implementation that can join
tables with different group keys. It also implements a strategy
for evicting stale data from the join operation's cache when
it can be determined that a table will no longer be joined.

Currently early table eviction from the buffers of the join occurs
when the left-most group key column of both input streams are equal
and that column is part of the join key.
2018-08-13 10:51:57 -07:00
Mark Rushakoff cbccbcecf5 chore: fix typo in filename 2018-08-10 08:22:47 -07:00
Nathaniel Cook 6bf2820e81 update README 2018-08-08 15:31:37 -06:00
Nathaniel Cook 5bde0b5be6 fix: Update query services to use Request type
Moves idpe.QueryService into platform/query.ProxyQueryService
Splits the Request into ProxyRequest and Request.

Changes query.QueryService and query.AsyncQueryService to use a Request
type. This means that the Compiler interface is consumed by the service
to abstract out transpilation vs Flux compilation vs raw spec.

The transpiler handler is removed.

There are separate http handlers and service implementations for each of
the three query services.

Query logging types are moved into platform.

The ResultIterator now expects Cancel to always be called.

The fluxd binary exposes the query endpoint specified in the swagger
file.
2018-08-08 15:31:35 -06:00
Christopher Wolff d7f64171cb Take into account ':<type>' when computing column header widths 2018-08-07 11:12:38 -07:00
Jonathan A. Sternberg af6fe59902
Merge pull request #541 from influxdata/js-flux-readme
docs(query): modify the flux readme to turn it into a getting started instead
2018-08-06 14:04:57 -05:00
Jonathan A. Sternberg 418d486488 docs(query): modify the flux readme to turn it into a getting started instead
For details, the user can always look at the spec, but a good getting
started guide that works is needed.

At the moment, this does not use the influx command. It does include
instructions for how to get started with docker since that is easiest to
setup and use.
2018-08-06 13:48:27 -05:00
Adam Perlin 0e80e5774b
Flux drop and rename functions (#482)
* Add Flux Rename, Drop, and Keep functions.

* Add flux language tests for drop and rename; bugfixes around constructing drop/rename procedures

* Correct autcomplete error, remove debug statements

* Fix additional autocomplete error

* Add support for fn parameter to flux drop and rename functions

* Remove unneeded renameDropTransformation field

* WIP initial thoughts about merge/procedure rewrite logic

* Remove unnecessary external columnFn types

* Add additional query tests for drop/rename, add error when drop or rename refers to column that doesn't exist

* Change swapped test names

* Add keep function implementation

* Refactor rename/drop implementation to make use of helper methods

* Remove test skips forqueries that produce an expected error

* Make predicate return value logic clearer in drop implementation

* Add group key support to drop/rename/keep, update unit and query tests accordingly

* WIP refactor drop and rename to use new SchemaMutator interface

* Add unit tests for refactored drop, keep, and rename; bug fixes

* Update file structure for flux schema mutation functions

* Refactor mutation functions and interface

* Address final review drop/rename PR review comments

* Add builtin import to make sure builtins are initialized if test drop_rename_keep_test is run as standalone

* Small aesthetic change to schema_mutators.go
2018-08-06 11:19:55 -07:00
Michael Desa 8c87c9d132 revert #442 2018-08-01 14:54:32 -04:00
Nathaniel Cook f4e94c8655 Merged pull request #525 from influxdata/nc-agg-errors
fix: More specific error messages for aggregate errors
2018-08-01 11:37:29 -06:00
Leonardo Di Donato bdaee706d6 Fixing last changes obtained from master to make them use uint64 IDs
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2018-08-01 18:20:59 +02:00
Leonardo Di Donato 5addb88eb5 MustIDFromString no more requires test instance
It panics now.
2018-08-01 18:20:59 +02:00
Leonardo Di Donato 3191de776d Refactoring code using platform.IDs
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2018-08-01 18:20:59 +02:00
Leonardo Di Donato 4387206181 Other test for IDs
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2018-08-01 18:20:59 +02:00
Leonardo Di Donato 711d4a3f33 Refactoring main package 2018-08-01 18:20:59 +02:00
Leonardo Di Donato 0778344cb0 Refactoring query package 2018-08-01 18:20:59 +02:00
Adam Perlin 3e98846a99
Specify how group key is handled in rename/drop spec (#524)
* Specify how group key is handled in rename/drop spec
2018-08-01 09:09:45 -07:00
Nathaniel Cook 590b9e61f4 fix: More specific error messages for aggregate errors 2018-07-31 16:58:01 -06:00
Adam Perlin ee7980dd4f
Add spec for flux rename/drop function (#462)
* Add initial rename specification to SPEC.md

* Tweak language in spec to be more explicit

* Update spec to be in accordance with final design decisions
2018-07-31 14:50:59 -07:00
Jonathan A. Sternberg 322486aa59
Merge pull request #521 from influxdata/js-default-parameters-for-range-spec
fix(query/influxql): include default parameters in the range spec
2018-07-31 13:36:23 -05:00
Nathaniel Cook 2848b4bf92 Merged pull request #516 from influxdata/nc-aggregate-type-err
fix: Properly check aggregate type
2018-07-31 12:33:33 -06:00
Nathaniel Cook 67bb9a2ce8 Merged pull request #519 from influxdata/nc-storage-time-overflow
fix: Explicilty handle overflow of currentTime is storage source
2018-07-31 12:31:53 -06:00
Jonathan A. Sternberg c94fc4d799 fix(query/influxql): include default parameters in the range spec 2018-07-31 12:53:34 -05:00
Jonathan A. Sternberg ced8f461fc fix(query): fix passing down the bucket id in the from call
The bucket id was not being copied when the from procedure was being
created so it never showed up and the bucket id was not set.
2018-07-31 12:53:05 -05:00
Nathaniel Cook 1a4bd6825b fix: Explicilty handle overflow of currentTime is storage source 2018-07-31 11:32:31 -06:00
Nathaniel Cook 553b15a217 fix: Properly check aggregate type 2018-07-31 10:30:35 -06:00
Mark Rushakoff 265235aaf1 refactor(query): move DefaultCompleter method to complete package
This is so Chronograf doesn't have to import the builtin package, which
finalizes builtin registration.

Also clarify that the builtin package should only be imported from main
or test packages.
2018-07-30 10:54:06 -07:00
Nathaniel Cook 21286235dd fix: Fix deadlock in query stats 2018-07-27 14:55:38 -06:00
Jonathan A. Sternberg feea4dff2e
Merge pull request #487 from influxdata/js-benchmark-end-to-end
tests(query/functions): add benchmarks for all of the query tests
2018-07-27 14:42:50 -05:00
Nathaniel Cook 920ef30a99 Merged pull request #494 from influxdata/nc-query-panic
fix: Panic in query/controller on Statistics
2018-07-27 09:30:49 -06:00
Nathaniel Cook 47b7f512da fix: Panic in query/controller on Statistics 2018-07-27 09:15:28 -06:00
Jonathan A. Sternberg 7494972d98 tests(query/functions): add benchmarks for all of the query tests
This uses the same code as the other end to end so we can benchmark the
entire query engine.
2018-07-26 16:09:13 -05:00
jlapacik 69e3627f42 controller sets Now time before enqueuing a query 2018-07-26 10:36:19 -07: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
Nathaniel Cook 2588b14df4 Merged pull request #436 from influxdata/nc-fix-repl-now
fix: Update REPL to correctly compile Spec with now option
2018-07-25 15:54:59 -06:00
Adam 2ee4157ded
feat(query/functions) Update percentile function to provide a selector option add transpiler support. (#444) 2018-07-25 16:32:04 -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
adamperlin 5bb0cae73f Add filtering to flux range function when not pushed down 2018-07-24 13:33:42 -07:00
adamperlin f6a5e47d4b Update formatting of flux increase built-in to align with standard style 2018-07-24 10:42:20 -07:00
adamperlin ca0b4e4549 Order all data by time in flux increase test case, add related non-negative derivative test case 2018-07-23 17:18:29 -07:00
adamperlin f8c204a62f Add increase to flux as built in function, change test data to account for counter wraps to values other than zero 2018-07-23 16:21:55 -07:00
jlapacik d70ec9a31f update flux grammar spec to include OptionStatement 2018-07-20 12:53:14 -07:00
Nathaniel Cook be817afc62 fix: Update REPL to correctly compile Spec with now option 2018-07-20 13:22:05 -06:00
Jonathan A. Sternberg f2a8ae22b2
Merge pull request #435 from influxdata/js-427-cancel-enqueue
fix(query/control): cancel the enqueue of a query if the context finishes
2018-07-19 13:59:00 -05:00
Jonathan A. Sternberg ff8c9cfb34 fix(query/control): cancel the enqueue of a query if the context finishes
If a query is attempting to be enqueued and it gets canceled, it will
now stop attempting to add it to the new queries queue and return the
error reported by the context. This allows the http server to cancel a
running query when the client disconnects for whatever reason without
continuing to attempt to process the canceled query.
2018-07-18 15:37:25 -05:00
Nathaniel Cook d568d7fd01 feat: Use DBRPMappings in 1.x read path 2018-07-18 09:46:57 -06:00
Lyon Hill be271bc6e4
Merge pull request #423 from influxdata/feat/query-eval
feat(query): split compile into two functions to allow Eval access
2018-07-17 16:48:03 -06:00
Lyon Hill 586d35ce98 update Eval docs 2018-07-17 16:17:55 -06:00
Lyon Hill ec2764f8d0 feat(query): split compile into two functions to allow Eval access 2018-07-17 16:12:17 -06:00
Lyon Hill cb04d22e73 feat(query): add task options 2018-07-17 15:52:33 -06:00
Nathaniel Cook 85b7d36147 feat: Add query statistics
Introduces the Statisticser interface which ResultIterators may
implement.

The HTTP implementation uses HTTP trailers to preserve the statistics.
This way we do not need to have all encoders and decoders support
statistics.
2018-07-17 09:16:27 -06:00
jlapacik 524c4ccf35 flux options interface
default now option value
2018-07-16 14:24:37 -07:00
Nathaniel Cook 336313bddb fix: Fix tests that are failing because of the rename
These tests were part of a PR when the rename was made.
The changes were not rebased before merge so we did not discover the
failures till after the merge.
2018-07-13 13:02:37 -06:00
Jonathan A. Sternberg 12b3e5de6d
Merge pull request #403 from influxdata/js-queryd-catch-execute-panics
feat(query/control): catch panics when executing a query in the controller
2018-07-13 13:33:57 -05:00
Adam Perlin b6afb5ff47
Merge pull request #398 from influxdata/ap-difference-panic-fix
Fix for panic when `difference` is called with no data
2018-07-13 10:42:12 -07:00
Nathaniel Cook d9b2377c9f Merged pull request #406 from influxdata/nc-rename-block
chore: Rename block to table
2018-07-13 10:56:44 -06:00
Nathaniel Cook 43ff647444 fix: Update Godoc parameter name 2018-07-13 10:43:20 -06:00
Adam Perlin ed1809a513
Merge pull request #390 from influxdata/ifql-test-metaquery
Add initial flux meta query tests
2018-07-13 09:27:33 -07:00
adamperlin 70fae6f77a Move length check out of loop 2018-07-13 09:17:59 -07:00
Nathaniel Cook 7902652290 chore: Rename local vars for b to tbl 2018-07-13 10:04:38 -06:00
Nathaniel Cook 80acc8d8c4 chore: Rename block to table 2018-07-13 09:56:35 -06:00
Adam Perlin 99e1f362af
Merge pull request #405 from influxdata/ifql-test-string-interp
Add flux string interpolation test
2018-07-13 08:55:36 -07:00
Nathaniel Cook e4848caa25 chore: Rename parition key to group key 2018-07-12 16:16:58 -06:00
Jonathan A. Sternberg 4a275e0e2e feat(query/control): catch panics when executing a query in the controller 2018-07-12 17:16:12 -05:00
adamperlin 4db4a832a3 Add flux string interpolation test 2018-07-12 15:06:59 -07:00
adamperlin becab773b3 Add additional measurements to flux measurement query test input 2018-07-12 13:18:02 -07:00
Nathaniel Cook 01ad9e99a7 Merged pull request #379 from influxdata/nc-bucket-id
feat(query): Add support for using bucketID in from
2018-07-12 13:42:29 -06:00
adamperlin 4885fd3049 Remove unnecessary condition from in flux difference function implementation 2018-07-12 12:42:16 -07:00
Nathaniel Cook 987b045f97 Merged pull request #381 from influxdata/nc-link
fix: Update Spec.md link
2018-07-12 13:40:19 -06:00
adamperlin 3e7c79a072 Fix off-by-one error in difference bounds check, update unit tests to account for n=1 and n=0 points 2018-07-12 11:38:24 -07:00
adamperlin d190ad369c Add fix for panic in flux difference function; add related tests 2018-07-12 11:38:20 -07:00
Jonathan A. Sternberg 3d67f92c82
Merge pull request #397 from influxdata/nc-controller-panic
fix(query): Fix panic in controller if planning errors
2018-07-12 12:50:30 -05:00
Nathaniel Cook 932c114649 fix(query): Fix panic in controller if planning errors 2018-07-12 11:47:34 -06:00
Adam Perlin a8ecbe52c5
Merge pull request #394 from influxdata/ifql-test-increase
Ifql test increase
2018-07-12 09:50:28 -07:00
Adam Perlin 9380d47a7d
Merge pull request #391 from influxdata/ifql-test-groupfield
Add flux test for explicitly grouping by field
2018-07-12 09:48:49 -07:00
adamperlin d1119b0b68 Update difference_panic flux test 2018-07-12 08:15:42 -07:00
Adam c8da4b02aa
feat(query/influxql): Add group-by time + offset support (#384)
previous versions only supported the first parameter to time() that set the window size.  This version supports the second parameter, which shifts the offset a fixed amount from the epoch
2018-07-12 10:46:29 -04:00
adamperlin a0300688d5 Add test cases for flux sum increase function and difference() panic 2018-07-11 20:32:08 -07:00
adamperlin ad2e467df9 Add flux test for explicitly grouping by field 2018-07-11 17:53:01 -07:00
adamperlin 16b6c5e39e Add initial flux meta query tests 2018-07-11 17:33:59 -07:00
Mark Rushakoff 15efa9d411 chore(query/control): use non-global prometheus metrics 2018-07-11 16:54:23 -07:00
Adam Perlin 8dbd50712c
Merge pull request #364 from influxdata/ifql-test-groupexcept
Add group except test for flux
2018-07-11 10:40:32 -07:00
adamperlin 274a27a22b Add additional tags to exclude in flux group except test 2018-07-11 10:18:01 -07:00
adamperlin bb13ef8d8a Change sequence in flux group except test 2018-07-11 10:18:01 -07:00
adamperlin 4f6ba26579 Add group except test for flux 2018-07-11 10:17:55 -07:00
Adam Perlin 34b7837449
Merge pull request #363 from influxdata/ap-panic-fix-stringmax
Fix panic when unimplemented selector function is used
2018-07-11 10:10:35 -07:00
adamperlin cadc97ecd1 Add link to issue in failing flux test skip description; change error constructor in test function 2018-07-11 10:03:55 -07:00
Nathaniel Cook 0ab163b68c fix: Update Spec.md link 2018-07-10 16:41:35 -06:00
Nathaniel Cook f47daadd43 feat(query): Add support for using bucketID in from 2018-07-10 15:52:48 -06:00
jlapacik aba6fc3378 order parents in join based on parameter name 2018-07-10 11:09:58 -07:00
adamperlin ac09a65727 Handle query execution errors in query_test to avoid infinite blocking issues after fail 2018-07-09 18:24:54 -07:00
adamperlin 8e34bd779e Update output file for flux string max test with new error message 2018-07-09 18:10:21 -07:00
adamperlin fe1493c120 Update error message for function unimplemented for data type in flux 2018-07-09 18:10:21 -07:00
adamperlin bcbc0256d5 Change error message when selector function is nil 2018-07-09 18:10:21 -07:00
adamperlin b46a14ba77 Remove broken nil check method; add simple interface nil check 2018-07-09 18:10:21 -07:00
adamperlin a546bbfcb1 Add error message when row selector interface has nil value to avoid panic 2018-07-09 18:10:21 -07:00
adamperlin dddfe38ee9 Move additional tests to new query test location 2018-07-09 14:17:02 -07:00
adamperlin b3aff30f4d Move main end to end flux query test to query/functions package dir 2018-07-09 14:13:53 -07:00
adamperlin df44aa0ad5 Move querytest/test_cases to functions/testdata and update query_test with new path 2018-07-09 14:13:53 -07:00
Jonathan A. Sternberg ca66f0df74
Merge pull request #376 from influxdata/js-query-try-plan
fix(query/control): race condition when attempting to plan a query in the controller
2018-07-09 16:00:01 -05:00
Adam 67bb5af1fb
regex support added to transpiler (#356)
* feat(query/influxql): add regex support to transpiler
also added test case to querytest

* Add raw_with_condition test to transpiler unit tests

* add unit tests for regex conditions on raw query
2018-07-09 16:54:00 -04:00
Jonathan A. Sternberg b9a4f1be74 fix(query/control): race condition when attempting to plan a query in the controller 2018-07-09 15:40:07 -05:00
jlapacik 15e3b7edf0 remove query domain 2018-07-09 13:27:30 -07:00
Jonathan A. Sternberg 9615528e31 fix(query/control): discard finished queries from the priority queue 2018-07-09 13:27:14 -05:00
Adam Perlin f92b105275
Merge pull request #360 from influxdata/ifql-time-selectors
Add test to make sure relevant _time values are returned when using top() selector
2018-07-06 16:31:25 -07:00
Adam Perlin 3b122e327d
Merge pull request #354 from influxdata/ifql-window-interval
Add initial window bound offset test cases for flux
2018-07-06 12:57:17 -07:00
adamperlin 0881ca9bee Add group() to selector_preserve_time flux tests 2018-07-06 12:36:15 -07:00
adamperlin 8e920cd793 Add test for default window boundary alignment in flux 2018-07-06 12:14:58 -07:00
adamperlin 622dd66356 Update test data point time ranges to include each _time value 2018-07-06 12:14:14 -07:00
Jonathan A. Sternberg c54a1e8fd9 feat(query/influxql): implement all of the basic aggregates and selectors 2018-07-06 13:45:35 -05:00
adamperlin 37ed9a8afa Add test to make sure relevant _time values are returned when using top() selector 2018-07-06 11:40:54 -07: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
adamperlin 695867ef1f Add initial window bound offset test cases for flux 2018-07-06 09:36:20 -07:00