Commit Graph

58 Commits (b5f6effda473af22cadc13b6be7747a1ad0b9486)

Author SHA1 Message Date
Kelvin Wang dcc052b1c2 fix(query): fix same bucket name with different orgs 2019-03-08 20:37:05 -05: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
Mark Rushakoff d73d73c0d4 chore: rename imports from platform to influxdb
I did this with a dumb editor macro, so some comments changed too.

Also rename root package from platform to influxdb.

In interest of minimizing risk, anyone importing the root package has
now aliased it to "platform" so that no changes beyond imports were
necessary in those files.

Lastly, replace the old platform module to local path /dev/null so that
nobody can accidentally reintroduce a platform dependency while
migrating platform code to influxdb.
2019-01-09 20:51:47 -08:00
Mark Rushakoff dae3dc8a7e chore(bolt,http,mock,query,testing): fix megacheck errors 2018-11-01 12:54:46 -07: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
Nathaniel Cook 672e2d5fe7 chore: Updates to be able to remove platform as a dependency of Flux 2018-09-12 10:18:54 -06:00
Stuart Carnie ac75af2f58 refactor: Migrate query package to influxdata/flux repository 2018-09-06 11:13:48 -07:00
Christopher M. Wolff 7e7c34f678
Create PreAuthorizer interface, BucketAwareOperationSpec interface (#664) 2018-09-05 12:06:26 -07:00
Nathaniel Cook 46a32e874c chore: Update 'from' to match spec
Removes the `db` parameter and used only bucket and bucketID.
2018-08-30 14:51:51 -06: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
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
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 d568d7fd01 feat: Use DBRPMappings in 1.x read path 2018-07-18 09:46:57 -06:00
jlapacik 524c4ccf35 flux options interface
default now option value
2018-07-16 14:24:37 -07:00
adamperlin d190ad369c Add fix for panic in flux difference function; add related tests 2018-07-12 11:38:20 -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
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
jlapacik 15e3b7edf0 remove query domain 2018-07-09 13:27:30 -07: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
adamperlin 37ed9a8afa Add test to make sure relevant _time values are returned when using top() selector 2018-07-06 11:40:54 -07:00
adamperlin 695867ef1f Add initial window bound offset test cases for flux 2018-07-06 09:36:20 -07:00
Jonathan A. Sternberg bfa7f2e719 feat(query/influxql): support for windowing
The transpiler now supports basic windowing. The window offsets are not
supported yet at all.

For windowing, we use the window function to split the points, perform
the aggregate/selector operation, and then we put them back into the
same window so they are within the same table as they originally were
located in. This is now reflected in the spec and the code.
2018-07-06 09:21:41 -05:00
Jonathan A. Sternberg 1ebccc8b6c
Merge pull request #127 from influxdata/js-transpiler-windowing
feat(query/influxql): support for windowing
2018-07-05 18:13:17 -05:00
adamperlin e486fe002e Remove unnecessary null behavior test in flux 2018-07-05 14:47:17 -07:00
adamperlin e2c21135e5 Update null behavior tests for flux 2018-07-05 13:54:23 -07:00
adamperlin 4ee241c949 Add tests for null keyword behavior 2018-07-05 13:36:56 -07:00
Jonathan A. Sternberg 691fa9ba97 feat(query/influxql): support for windowing
The transpiler now supports basic windowing. The window offsets are not
supported yet at all.

For windowing, we use the window function to split the points, perform
the aggregate/selector operation, and then we put them back into the
same window so they are within the same table as they originally were
located in. This is now reflected in the spec and the code.
2018-07-05 15:34:26 -05:00
Adam Perlin e20dada94a
Merge pull request #348 from influxdata/ifql-issue-tests
Add test cases for sorting strings in flux
2018-07-05 13:14:31 -07:00
adamperlin 44802e41ca Add link to corresponding issue in failing flux test skip reason 2018-07-05 12:47:30 -07:00
adamperlin 9c1412198e Add skip for panicking test 2018-07-05 11:53:32 -07:00
adamperlin 5f94cc2ce2 Update string selection tests 2018-07-05 11:35:00 -07:00
adamperlin 9c0d1ab2a5 Vary string prefixes in sort by length test 2018-07-03 17:01:23 -07:00
adamperlin 380f7b132c Add test cases for sorting based on length and character value in flux 2018-07-03 16:46:24 -07:00
Jonathan A. Sternberg 98597551d3 feat(query/influxql): support for group by
The transpiler now supports grouping by tags.
2018-07-03 10:18:03 -05:00
Jonathan A. Sternberg 3aed4b2a3d feat(query/influxql): modify the encoder to allow more flexibility from the transpiler
This extra flexibility makes it easier for the transpiler to generate a
specification since the map step can be focused on only generating the
columns related to fields. In particular, it makes it easier to
implement wildcards for tags because the tags will get passed along with
the partition key.
2018-07-02 13:38:12 -05:00
Jonathan A. Sternberg bcd0545728 fix(query/influxql): have the transpiler use the _time column for the time
The spec says to use the `_time` column for the time in the output, but
we were mapping `r._time` to `time` and using the `time` variable. This
modifies the encoder to use the `_time` column and rename it to `time`
for the column name.
2018-07-02 12:48:15 -05:00
Nathaniel Cook f128074458 feat(query): Change Encode interface to return bytes written 2018-06-27 10:31:04 -06:00
Nathaniel Cook 41b822380b chore: Make control.Controller implement AsyncQueryService 2018-06-25 15:24:40 -06:00
Mark Rushakoff c74bcd11b4 chore(query): remove usage of query/id package
It was effectively a copied and pasted platform.ID, so change it to a
type alias. Once our known references to the query/id package are
updated to platform.ID, we'll delete the package.
2018-06-20 12:55:20 -07:00
Nathaniel Cook d1ca38c71f chore(ifql): Rename IFQL to Flux 2018-06-11 09:26:10 -06:00
Adam a795d666fc
feat(query/influxql) transpiler encoding end to end tests working (#103)
Finalized support for testing against JSON, added some tests.  Added colMap to result encoder to make initial tests pass
2018-06-06 12:43:56 -04:00
Adam 070649527c
feat(query/querytest): first batch of tests ready for review (#56)
* feat(query/querytest): first batch of tests ready for review

added helper executables for generating output, comparing specs.  Also updated several tests and added code to skip red tests with a clear reason in the message
2018-05-31 16:45:44 -04:00
Nathaniel Cook 6b2cf4e666 Merged pull request #96 from influxdata/nc-query-builtin
chore(query/builtin): Add package to formalize query builtin initialization
2018-05-31 12:07:49 -06:00