Commit Graph

347 Commits (c5606851c8af7ed0301c9142480652122a69f5f0)

Author SHA1 Message Date
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 e7f76b3f14
Merge pull request #357 from influxdata/js-transpiler-spectests
refactor(query/influxql): move transpiler spec tests to its own package
2018-07-06 12:32:37 -05: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
Jonathan A. Sternberg 55f0c59eca
Merge pull request #350 from influxdata/js-transpiler-unimplemented-tests
refactor(query/influxql): modify the transpiler compilation tests to remove skip
2018-07-06 09:33:05 -05:00
Jonathan A. Sternberg 27cd61e22d refactor(query/influxql): modify the transpiler compilation tests to remove skip
The transpiler compilation tests will now not allow skip to be
specified. Instead, it must return an error message that starts with
`unimplemented` and then the reason will be used as the skip message.

This way, it will be easier to identify the failing tests in the
transpiler. In the previous method, it was possible for a test to be
marked as skip, but for the transpiler to return the wrong error message
because the test did not differentiate between an unimplemented error
message and an incorrect error message.
2018-07-06 09:21:41 -05: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
Adam Perlin 9fb5f6b14a
Merge pull request #349 from influxdata/ifql-test-null
Add tests for null keyword behavior
2018-07-05 15:22:06 -07: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
Jonathan A. Sternberg ab5f7fc615 feat(query/functions): allow window to ignore the global boundaries of the query 2018-07-05 13:32:23 -05: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 a1ad0d0100
Merge pull request #205 from influxdata/js-transpiler-unimplemented-error-details
feat(query/influxql): add additional error details for a few unimplemented errors
2018-07-03 15:39:17 -05:00
Jonathan A. Sternberg adec513306 feat(query/influxql): add additional error details for a few unimplemented errors 2018-07-03 15:37:53 -05:00
jlapacik b645c94f5d
Merge pull request #196 from influxdata/jl-side-effects
Evaluate semantic graph and return results of side effects
2018-07-03 12:47:24 -07:00
jlapacik b896ed1c5b add HasSideEffect method to Function interface
evaluate CallExpression to determine if function has side effects
return all side effects
add Equal method to Value interface
2018-07-03 12:44:09 -07:00
Nathaniel Cook 543d679497 Merged pull request #201 from influxdata/nc-transpiler-errors
fix(transpiler): Include function name in error
2018-07-03 13:07:03 -06:00
Nathaniel Cook b4e68fad98 fix(transpiler): Include function name in error 2018-07-03 13:01:25 -06:00
Jonathan A. Sternberg becc830f2d
Merge pull request #199 from influxdata/js-transpiler-compile
tests(query/influxql): port over the compiler tests for influxql
2018-07-03 11:35:57 -05:00
Jonathan A. Sternberg eee8ad2d21 tests(query/influxql): port over the compiler tests for influxql
The compiler tests from the github.com/influxdata/influxdb/query have
been moved over to the influxql transpiler in platform. The framework
has updated to include a skip option so that all of the tests can be
there, but not all of them have to succeed at the moment. If a test
starts succeeding but is marked as one that should be skipped, it will
also cause an error to prevent us from doing work on the transpiler
without marking the test as something not to skip anymore (so progress
is always made).
2018-07-03 10:58:27 -05:00
Jonathan A. Sternberg 739e8ae6e5
Merge pull request #198 from influxdata/js-transpiler-dimensions
feat(query/influxql): support for group by
2018-07-03 10:20:12 -05: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 2307b7d91c
Merge pull request #192 from influxdata/js-transpiler-flexible-encoder
feat(query/influxql): modify the encoder to allow more flexibility from the transpiler
2018-07-03 09:37:29 -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 c4e006eebd
Merge pull request #190 from influxdata/js-transpiler-time-columns
fix(query/influxql): have the transpiler use the _time column for the time
2018-07-02 13:13:39 -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 4f335f2372 Merged pull request #189 from influxdata/nc-nightlies
fix(Makefile): Nightly builds had wrong path
2018-07-02 10:38:48 -06:00
Nathaniel Cook 0d82054f51 fix(Makefile): Nightly builds had wrong path 2018-07-02 10:36:41 -06:00
Jonathan A. Sternberg f42fc81c71
Merge pull request #184 from influxdata/js-storage-grpc-service
feat(query/functions/storage): switch to using the grpc client
2018-06-29 12:32:02 -05:00
Nathaniel Cook 40ee7afbad Merged pull request #185 from influxdata/nc-fluxd-errors
fix(errors): Update Fluxd errors
2018-06-29 09:15:27 -06:00
Nathaniel Cook b63394da0a fix(errors): Update Fluxd errors
This PR also completes some TODOs about kit/errors and http/errors.
2018-06-28 16:56:35 -06:00
Nathaniel Cook 83282276ae Merged pull request #183 from influxdata/nc-http-status
fix(http): Fix status class when WriteHeader was not called
2018-06-28 16:22:12 -06:00
Jonathan A. Sternberg 2ba945c5d3
Merge pull request #182 from influxdata/js-transpiler-panic
fix(query/influxql): transpiler should not panic when a function is used with a non-variable
2018-06-28 17:08:39 -05:00
Nathaniel Cook c83aa9d64e Merged pull request #169 from influxdata/nc-makefile-goos
chore(Makefile): Update Makefiles to use GOOS
2018-06-28 13:33:24 -06:00
Nathaniel Cook 541a7561de fix(http): Fix status class when WriteHeader was not called 2018-06-28 13:13:32 -06:00
Jonathan A. Sternberg 144d9f25fd feat(query/functions/storage): switch to using the grpc client 2018-06-28 14:03:39 -05:00
Jonathan A. Sternberg 2cc2f2fe41 fix(query/influxql): transpiler should not panic when a function is used with a non-variable 2018-06-28 13:31:31 -05:00
Mark Rushakoff f7d539e270 chore(query): remove id package
Finishes up work started in #145, now that our internal dependencies no
longer refer to plaform/query/id.
2018-06-28 10:09:49 -07:00
Jonathan A. Sternberg d62b9d3b28
Merge pull request #119 from influxdata/js-transpiler-options
feat(query/influxql): expose default database and retention policy for transpiler
2018-06-27 12:29:55 -05:00
Nathaniel Cook 35953a3e8a Merged pull request #177 from influxdata/nc-write-count
feat(query): Change Encode interface to return bytes written
2018-06-27 10:41:50 -06:00
Nathaniel Cook f128074458 feat(query): Change Encode interface to return bytes written 2018-06-27 10:31:04 -06:00
Jonathan A. Sternberg 2388d95949 feat(query/influxql): expose default database and retention policy for transpiler
The influxql transpiler can now be configured with a default database
and retention policy.
2018-06-27 10:23:37 -05:00