Commit Graph

19 Commits (846455a487f074d35b21da51365d921d99d1739d)

Author SHA1 Message Date
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
Nathaniel Cook e4848caa25 chore: Rename parition key to group key 2018-07-12 16:16:58 -06: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 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
Jonathan A. Sternberg adec513306 feat(query/influxql): add additional error details for a few unimplemented errors 2018-07-03 15:37:53 -05: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
Jonathan A. Sternberg fad9b30705
Merge pull request #120 from influxdata/js-transpiler-buckets
feat(query/influxql): transpile using buckets instead of the database
2018-06-20 14:47:18 -05:00
Jonathan A. Sternberg 86defc1e37 feat(query/influxql): transpile using buckets instead of the database
The transpiler should use a bucket for the `from()` call instead of the
database parameter which will likely be deprecated. The bucket that it
will read data from is `db/rp` and, if the retention policy isn't
specified, `autogen` will be used as the default.
2018-06-11 10:13:11 -05:00
Jonathan A. Sternberg b1ab4e87f6 feat(query/influxql): support multiple select statements 2018-06-08 16:10:50 -05:00
Jonathan A. Sternberg 119021dc67 feat(query/influxql): implement filter conditions for tags in the transpiler 2018-06-08 14:18:41 -05:00
Jonathan A. Sternberg 1b31a1150c refactor(query/influxql): follow the transpiler readme
There are a few changes to how the transpiler works. The first is that
the streams are now abstracted behind a `cursor` interface. The
interface keeps track of which AST nodes (like variables or function
calls) are represented by the data inside of the stream and the method
of how to access the underlying data. This makes it easier to make a
generic interface for things like the join and map operations. This also
makes it easier to, in the future, use the same code from the map
operation for a filter so we can implement conditions.

This also follows the transpiler readme's methods and takes advantage of
the updates to the ifql language. This means it will group the relevant
cursors into a cursor group, perform any necessary joins, and allow us
to continue building on this as we flesh out more parts of the
transpiler and the language.

The cursor interface makes it so we no longer have to keep a symbol
table mapping the generated names to the locations because that is all
kept within the incoming cursor rather than as a separate data
structure.

It also splits the transpiler into more files so it is easier to find
the relevant code for each stage of the transpiler.
2018-06-08 13:07:10 -05:00
Jonathan A. Sternberg ea1809c0bf fix(query/influxql): add group spec back to the transpiler
The latest version of influxdb has fixed whatever was wrong with the
group function so this works properly again.
2018-05-31 11:43:58 -05:00
Jonathan A. Sternberg a44374a0c5 feat(query/influxql): encode influxql json results correctly
This fixes the encoder so that it will encode the response correctly to
a JSON blob using the outputs of the transpiler. The transpiler has also
been modified to pass through the correct values so the map function is
correctly constructed and the aggregate function is also correctly
constructed.

This removes the group function temporarily because it does not seem to
be working.
2018-05-31 11:07:27 -05:00
Jonathan A. Sternberg 174ce83f5d feat(query/influxql): use yield name to specify the statement id
The transpiler will now yield each statement using the statement id so
the result encoder can properly order the results and encode the
statement id. This behavior is now in the transpiler spec.
2018-05-24 16:33:51 -05:00
Nathaniel Cook c8ff490338 chore: Add Makefile 2018-05-22 14:45:23 -06:00
Nathaniel Cook 20345b8701 rewrite imports 2018-05-21 15:20:06 -06:00
Nathaniel Cook c0b01f16f8 update transpiler and influxql encoders 2018-05-19 15:28:37 -06:00
Adam 64e3c840ea Relocated several source files from private repo to here. 2018-05-17 11:35:53 -04:00