Commit graph

45 commits

Author SHA1 Message Date
Nia Weiss
f4ba34247f
remove attributes
Attributes are unmaintained and unused.
They have become more of a liability than a benefit.
This change eliminates them from the codebase.
The only user-visible change (assuming that attrs are not used) is that the attrs field will no longer appear in row JSON.
2021-05-14 10:28:08 -04:00
Ben Johnson
cfc725e799 Add timestamp field type support 2021-04-06 10:50:10 -06:00
Kuba Podgórski
1dac4c7622 Consistency with aggregate functions 2021-03-16 15:02:40 +01:00
Maxton Huff
3822e38952 remove z arg from Rows tests 2021-02-26 16:15:37 -06:00
Maxton Huff
441630d804 try fixing tests 2021-02-26 16:13:00 -06:00
Maxton Huff
8bc8368c57 change test arguments to be appropriate 2021-02-26 12:58:59 -06:00
Maxton Huff
ab41d0492c add more tests for TopK, Rows, and SetRowAttrs 2021-02-25 16:04:31 -06:00
Maxton Huff
6b75a8b500 Revert "allow 'field=' for TopN()"
This reverts commit db01237904.
2021-02-25 11:01:22 -06:00
Maxton Huff
db01237904 allow 'field=' for TopN() 2021-02-24 15:29:10 -06:00
Seebs
6e725d50ce check error return from peg parser Init
The updated peg tool produces an Init that can return an error. As
of this writing, the error can't be non-nil unless you specified an
option which itself returned an error, but that could change later,
so let's be careful.
2020-10-19 13:47:42 -05:00
Alan Bernstein
6fc5465aaa Use rune slice in all cases, add tests 2020-08-19 16:32:27 -05:00
Alan Bernstein
0a96043c23 Use _buffer instead of buffer 2020-08-19 16:32:27 -05:00
Travis
e4b9293f26
Add support for int == null 2020-05-22 12:29:52 -05:00
Travis
88b2d79812 serialize null operation (!= null) 2020-04-09 17:56:27 -05:00
Travis
3b676a7cbd fix linter warnings 2020-03-13 12:15:54 -05:00
Travis
0c6f0e2ba5 fix Call stringer for range conditional 2020-03-11 22:53:37 -05:00
Matt Jaffee
9c8ad727b5
allow floats in PQL queries for decimal fields
had to workaround some cruft in the parser that was trying to only
support a BETWEEN query as LTE, LTE. Now we have operations for all
combinations of LT and LTE.

unrelated - changed the port a test was binding to as it conflicted
with a port I was using locally.
2019-11-13 10:07:24 -06:00
Seebs
3b696da34a plugins and precomputed data
So in some cases, when we do a query, the results of one
part of the query are innately shared-across-nodes; for
instance, a hypothetical Distinct query. More generally,
we allow cross-index queries; calls can have "index=foo"
in them.

This patch lets us handle that without duplicating that
query all over. Before we actually start doing the
separate calls, we run the query once from the coordinating
node, then patch the results in, and send relevant subsets
over to each client, etcetera. Also provides slightly
friendlier (and I hope faster) support for converting
bitmaps to/from sets of rows.

We also add an extension interface, and some fancy stuff
to let us define new calls, which use this. They're sort
of tied together because the first extension I wanted to
implement needed precomputed calls. The extension API
lets us create extensions using `pkg/plugin` (with all its
associated limitations, unfortunately), then query them
at load time for functionality.

This also implies some revamping of the argument
validation for PQL, like verifying that functions exist
and knowing things about their argument types.

So basically this is an overly intrusive patch, and would
be better as separate patches, but they're hard to detangle.

add trivial execution-time profiling

What if you could ?profile=true on a query and get some
numbers back? That'd be really cool.

We already have tracing/spans, but right now, those only generate
any data if you have something set up for them to trace to. Add a
fancy wrapper that lets us generate our own tracing data, and dump
it into the request response, if ?profile=true.

add a sample extension, add missing features to extension interface

Implement a naive probabilistic filter extension as an example of
what an extension looks like. In the process, discover multiple
omissions in the bitmap API. Well, I did *say* it was experimental.
2019-11-12 12:14:29 -06:00
Shaquille Wyan Que
b770167db6 fixed formatting 2019-05-15 10:52:15 -05:00
Shaquille Wyan Que
98a864634e fixed out of bounds panic to show error 2019-05-14 16:58:03 -05:00
Travis Turner
bdc4f3b07e
recover the duplicate arg panic from parser, treat as error 2019-04-10 23:48:17 -05:00
Travis Turner
5f079163cb
validate (and panic) on duplicate PQL arguments 2019-04-10 16:34:30 -05:00
Matt Jaffee
5458a42ad0
add parser rule to catch old-style Range query 2019-04-04 19:46:02 -05:00
Yuce Tekol
9f6d489be8
fixes #1823. Updates tests and docs for row range 2019-01-14 14:39:08 +03:00
Travis Turner
f7e3296f62
fixes a bug on upper end of bsi range queries 2019-01-11 17:05:29 -06:00
Travis Turner
0b1fb73b14
add a test for groupby filter with RangeLTLT 2019-01-10 16:56:10 -06:00
Ben Johnson
9d1e5ca8ce
Merge Range() into Row() call.
This commit refactors the `Range()` call and merges its functionality
into the `Row()` call.
2019-01-09 15:10:49 -07:00
Ben Johnson
727659644b
Add GroupBy filter. 2018-12-07 10:35:57 -07:00
Yuce Tekol
80c1a734ba
trivial 2018-09-11 20:51:32 +03:00
Yuce Tekol
aa618c30d5
Implements Query call excludeRowAttrs, excludeColumns and shards args 2018-09-10 17:29:55 +03:00
Cody Soyland
dd7b5f517b
Merge branch 'master' into 1513-metalinter-megacheck 2018-08-02 10:29:47 -05:00
Travis Turner
dfd529b2f5
update parser to handle row keys on SetRowAttrs() 2018-07-27 10:50:04 -05:00
Cody Soyland
990780bd93 Fix linter issues: staticcheck (covered by megacheck, along with gosimple and unused) 2018-07-20 11:19:24 -05:00
Ben Johnson
bcd15ef271
peg: Allow single quoted key 'col'. 2018-07-09 18:31:27 +01:00
Matt Jaffee
f757e10255
support newlines in more places 2018-07-03 16:28:51 -05:00
Matt Jaffee
4ab9c66070
allow dashes in frame names 2018-06-26 07:00:13 -05:00
Alan Bernstein
5bf9af4df3 Parser and test updates 2018-06-22 08:07:31 -05:00
Matt Jaffee
205b7620bd
update SetColumnAttrs name 2018-06-20 09:31:20 -05:00
Matt Jaffee
08e84aa07f
time range support 2018-06-19 14:07:03 -05:00
Matt Jaffee
5c081d1518
more tests, fix bug where Condition wasn't pointer 2018-06-18 11:59:39 -05:00
Matt Jaffee
a6b6442ef4
more tests and fix range 2018-06-18 11:32:21 -05:00
Matt Jaffee
23bca175ae
add tests, fix tests, fix bugs 2018-06-15 15:02:41 -05:00
Matt Jaffee
1e05920742
fuzz testing and bug fixes 2018-06-15 08:34:14 -05:00
Matt Jaffee
3656bc83a0
support quoted strings properly 2018-06-15 08:34:13 -05:00
Matt Jaffee
47233c8bee
replace PQL parser with one created by PEG parser generator 2018-06-15 08:34:12 -05:00