Commit Graph

304 Commits (9a65938e1d8c28c76201cb7d4f6f7c2ac2e932e3)

Author SHA1 Message Date
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
Chris Goller 90494a5309 chore(fmt): fix and simplify go formatting 2018-10-08 17:23:54 -05:00
Brandon Farmer c1c4dc3393 Properly handle spaces in PATH with make tasks 2018-10-08 09:53:22 -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
Jonathan A. Sternberg 37ffbfc687
feat: add an influxql service that communicates with influxdb 1.x
It creates a simple client that follows the QueryService interface and
uses the `influxql.Compiler` type to determine where the query should be
routed to and to return the query as a `flux.ResultIterator`.

This will be useful for replaying transpiler queries against influxdb
1.x servers to verify correctness.
2018-10-03 11:17:29 -05:00
Michael Desa 1a0c29ad34 feat(platform): add authorizer interface
This iterface is supposed to be something that both sessions and
authorizations can share so that other components can authorize requests
as they see fit.
2018-10-02 14:11:44 -04:00
Chris Goller 1dd29d43f6
fix(query/docs): update Flux spec to flux repo 2018-10-01 09:38:33 -05:00
Jonathan A. Sternberg 2ee5308a27
fix: the master build no longer uses -i when building the influx binary
The `-i` flag causes a problem when a cross compilation happens because
it attempts to build files in GOROOT which is located in a directory
that is not writable by the build user. This same problem exists for
when the `-tags` are changed like adding `-tags assets` in the `all`
build that runs on the master branch.

This removes `-i` because, in the latest go release, the `-i` flag
doesn't actually do anything useful since there is another build cache
that the results are placed in regardless of whether `-i` is used.

This fixes the build on master so that `make all` and `make nightly`
will function properly.
2018-09-25 11:33:07 -05:00
Jonathan A. Sternberg 9cda24a69c
adding a test for the measurements and fixing the functionality 2018-09-25 10:25:58 -05:00
Jonathan A. Sternberg 129186efec
feat: implement basic show tag values in the transpiler 2018-09-24 15:02:05 -05:00
Jonathan A. Sternberg 46ed9bc4fb feat: switch to using go modules for building
This updates the dependency manager to use go modules instead of dep so
that we can remove dep as a dependency and we can begin using and giving
feedback on modules within this project. It should simplify dependency
management and make it faster to run the builds too.

The big change is updating the various Makefiles to stop relying on the
vendor directory because it no longer exists. This change creates a
`tools.go` file with the revisions of the tools we use that are currently
in the `required` section of `Gopkg.toml`. We are currently in other
discussions to modify how we handle tool dependency management, but this
change does not change that.
2018-09-20 08:33:15 -07:00
Jonathan A. Sternberg 0e0249ff2e
Merge pull request #839 from influxdata/js-show-tag-values-doc
docs(query/influxql): update the transpiler doc for show tag values
2018-09-17 13:45:48 -05:00
Jonathan A. Sternberg d5631c3366 docs(query/influxql): update the transpiler doc for show tag values 2018-09-14 16:59:38 -05:00
Jonathan A. Sternberg e884764664 fix(query/influxql): fix the formatting of the influxql readme
The previous format was easier to edit and I reorganized the headers.
2018-09-14 16:33:27 -05:00
Nathaniel Cook 71e13c8e8f chore: Remove redundant Flux tests 2018-09-14 15:32:15 -06:00
Nathaniel Cook d65a864ec5 fix: Update REPL to use HTTP API 2018-09-14 14:03:35 -06: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
Adam 4733ecd1f2
README + initial skeleton in place for SHOW TAG VALUES(#815)
* README + initial skeleton in place

* Fixes according to review
2018-09-12 14:54:13 -04:00
Nathaniel Cook 1786402d48 Merged pull request #822 from influxdata/nc-remove-platform
chore: Updates to be able to remove platform as a dependency of Flux
2018-09-12 10:31:25 -06: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
Jonathan A. Sternberg 131767572e feat(query/influxql): update the spec for time normalization in selectors 2018-09-11 13:09:48 -05:00
Jonathan A. Sternberg a5641f6fd9 fix(query/influxql): join multiple aggregates with the new join function 2018-09-10 11:54:38 -05:00
Stuart Carnie 7a05dfb61e refactor: Update Makefiles 2018-09-06 13:56:59 -07: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
jlapacik 24f1be808d spec outlining packages, namespaces, and imports 2018-09-04 10:41:01 -07:00
jlapacik 2f1635a85d csv test for join 2018-09-04 10:04:01 -07:00
Nathaniel Cook 35002fa90f Merged pull request #738 from influxdata/nc-histogram
feat: Add histogram function for computing bucket based histograms
2018-09-04 09:51:32 -06:00
Jonathan A. Sternberg 1776778a06
Merge pull request #764 from influxdata/js-transpiler-pivot
docs: update the transpiler docs to use pivot
2018-09-04 09:44:06 -05:00
Christopher Wolff a58c9a63f8 Parse duration literals 2018-08-31 15:33:43 -06:00
Jonathan A. Sternberg a45bd08cf6 docs: update the transpiler docs to use pivot
Instead of generating multiple cursors, a pivot is used to join fields
within the same series.

This should be easier than generating a new cursor for everything.
2018-08-31 16:15:28 -05:00
Michael Desa 4eb2b72bf3 feat(query/influxql): implement query.ResultIterator for influxql.Response
WIP: saving state reword

feat(query/influxql): implement query.ResultIterator directly on response

review(influxql): add ResponseIterator that implement query.ResultIterator

review(influxql): update code is response to review
2018-08-31 13:38:25 -04:00
Nathaniel Cook 128b85ecd1 feat: Add histogram function for computing bucket based histograms 2018-08-31 09:43:45 -06: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
Nathaniel Cook 745376a5fe Merged pull request #737 from influxdata/nc-group-missing
fix: Fix group by panic when missing a column
2018-08-30 14:38:01 -06:00
Adam 559ef60a78
feat(query): Created mapped/unmapped versions of append table and updated functions that use it (#751) 2018-08-30 15:01:27 -04:00
Adam 4bb5f5398a
feat(query/functions) Updated percentile to be more memory compact and managed by allocator (#739) 2018-08-30 13:35:04 -04:00
Adam cb3d099f6c
add query/functions/doc.go (#686)
* finished with first draft of doc.go.  Need to follow up on documenting related packages
2018-08-30 12:01:32 -04:00
Nathaniel Cook e57fab6a7b fix: Fix group by panic when missing a column 2018-08-29 15:53:47 -06:00
Jonathan A. Sternberg aa052e1a57 feat(query/plan): make it possible to configure the default memory limit for queries
The previous default was just to have no limit at all. This adds a
configuration option to the planner so a static value can be set for the
memory limit on each individual query.
2018-08-28 16:24:49 -05:00
Michael Desa 45233d939a feat(platform): add uniform query endpoint for sources
Using query request struct to query resources

Signed-off-by: Lorenzo Fontana <lo@linux.com>

Use query.ProxyRequest instead query.Request

Signed-off-by: Lorenzo Fontana <lo@linux.com>

Proxy request from idpd

Signed-off-by: Lorenzo Fontana <lo@linux.com>

Comments about the desired results

Signed-off-by: Lorenzo Fontana <lo@linux.com>

V1 endpoints working with flux

Signed-off-by: Lorenzo Fontana <lo@linux.com>

Influxql working for v1

Signed-off-by: Lorenzo Fontana <lo@linux.com>
Co-authored-by: Michael De Sa <mjdesa@gmail.com>

V2 influxql query endpoint working

Signed-off-by: Lorenzo Fontana <lo@linux.com>
Co-authored-by: Michael De Sa <mjdesa@gmail.com>
Signed-off-by: Lorenzo Fontana <lo@linux.com>

V2 Flux compiler support

Co-authored-by: Michael De Sa <mjdesa@gmail.com>
Signed-off-by: Lorenzo Fontana <lo@linux.com>

Improve comments in bolt sources and give error on self

Signed-off-by: Lorenzo Fontana <lo@linux.com>
Co-authored-by: Michael De Sa <mjdesa@gmail.com>

Review tests failing

Signed-off-by: Lorenzo Fontana <lo@linux.com>
Co-authored-by: Michael De Sa <mjdesa@gmail.com>

Avoid type casts for compiler types

Signed-off-by: Lorenzo Fontana <lo@linux.com>
Co-authored-by: Michael De Sa <mjdesa@gmail.com>

Using nil instead of dbrp mapping service for influxql v1

Signed-off-by: Lorenzo Fontana <lo@linux.com>

Check if compiler types are valid for influxql

Signed-off-by: Lorenzo Fontana <lo@linux.com>

Organization as query param in the flux external handler

Signed-off-by: Lorenzo Fontana <lo@linux.com>

feat(http): update swagger documentation for flux query endpoint

feat(http): document query endpoint design

The code documented does not currently work. It is indended that this
will be implemented in follow up PRs.

feat(platform): move source to platform package

The source Query endpoint implements what's in the query swagger docs

Signed-off-by: Lorenzo Fontana <lo@linux.com>
Co-authored-by: Michael De Sa <mjdesa@gmail.com>

feat(platform): allow for encoding and decoding of csv dialects

feat(platform): specify dialect in flux page

Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
2018-08-28 15:53:20 -04:00
Jonathan A. Sternberg bb4fc188a2
Merge pull request #721 from influxdata/js-query-log-statistics
fix(query): report query statistics correctly
2018-08-28 12:55:22 -05:00
Jonathan A. Sternberg 1fe16a04de fix(query): report query statistics correctly
The query statistics would only be read after the cancel call so we need
to wait for that before attempting to read the statistics rather than
attempting to read them immediately after the result is returned (before
it is read).
2018-08-28 12:39:56 -05:00
Nathaniel Cook a9f10e11a5 fix: Fixes data race on object type 2018-08-28 10:39:56 -06:00
Nathaniel Cook 5b9b111166 Merged pull request #714 from influxdata/nc-fix-query-panic
fix: Fixes panic in query from sharing builtin decls
2018-08-28 09:09:34 -06:00
Adam 05a2feb1fc
Added default signature generators for Selector and Aggregate configs and update the functions that need them (#690)
* Added default signature generators for Selector and Aggregate configs and update the functions that need them

* fix to percentile to collect the correct arguments for both aggregate and selector
2018-08-27 17:20:18 -04:00
Nathaniel Cook 796fd7217e Merged pull request #685 from influxdata/nc-hist-quantile
feat: Add histogramQuantile function
2018-08-27 14:25:35 -06:00
Nathaniel Cook 937158f63a Merged pull request #715 from influxdata/nc-data-race
fix: Fixes #697 data race in execute test
2018-08-27 14:19:59 -06:00
Nathaniel Cook 575c8138cc fix: Fixes #697 data race in execute test 2018-08-27 13:57:51 -06:00
Nathaniel Cook c6567a9ed1 fix: Fixes panic in query from sharing builtin decls 2018-08-27 13:48:13 -06:00