Commit graph

286 commits

Author SHA1 Message Date
tgruben
e5df52836e
Merge branch 'master' into shift-op 2019-01-15 08:57:28 -06:00
Yuce Tekol
9f6d489be8
fixes #1823. Updates tests and docs for row range 2019-01-14 14:39:08 +03: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
Yuce Tekol
08b22da8c9
Merge branch 'master' into public-proto-remove-bit-add-fieldrow-rowkey 2019-01-03 15:48:09 +03:00
Yuce Tekol
65c30283d7
adds tests for GroupBy with keys; removes unused Bit message from proto 2019-01-03 15:20:02 +03:00
Matt Jaffee
5b14227e08
convert gotos to for loops 2019-01-02 14:32:59 -06:00
Todd Gruben
216fd0964a
a quicker empty check for group by 2019-01-02 14:32:59 -06:00
Matt Jaffee
aa0d64047d
add horrifying code to skip rows with count 0 in Group By 2019-01-02 14:32:59 -06:00
Matt Jaffee
81d08be044
fix PQL, Rows and Group By problems
make sure that args which are Uints are positive and return an error if not.

improve group by error messages if field for Rows query is invalid
2018-12-21 14:16:55 -06:00
Matt Jaffee
97eb94397f
fix Rows bug where Pilosa would crash without 'field' argument. 2018-12-21 11:55:25 -06:00
Ben Johnson
88c18ca1fe
Cancel queries on Context.Done()
This commit periodicially checks if the context has been cancelled
or if a deadline has been reached. If so, it returns a query-related
error message depending on the cause.
2018-12-12 16:55:44 -07:00
Matt Jaffee
8b3e5b998a
fix data race which appears to be unrelated to previous changes 2018-12-11 15:45:44 -06:00
Ben Johnson
727659644b
Add GroupBy filter. 2018-12-07 10:35:57 -07:00
tgruben
dc8f0a430b
Merge branch 'master' into shift-op 2018-11-26 11:55:57 -06:00
Todd Gruben
0404354faa add shift operater to pql 2018-11-26 11:29:05 -06:00
Ben Johnson
8e49332b25 Add distributed tracing. 2018-11-21 15:08:33 -06:00
Matt Jaffee
e1adb8ce5f
fix view.createFragment race 2018-11-20 14:21:37 -06:00
Matt Jaffee
5458eb1656
fix holder.opened race with absurd lockedChan 2018-11-20 14:21:36 -06:00
Matt Jaffee
21c35e6861
wrap errors, fix comment, add test 2018-10-24 17:18:39 -05:00
Matt Jaffee
671420f31d
add custom json marshal for FieldRow 2018-10-24 17:11:45 -05:00
Travis Turner
9fee746e76
translate column argument in Rows() query 2018-10-22 17:41:59 -05:00
Matt Jaffee
f9dbacf332
fix compile errors 2018-10-18 14:36:44 -05:00
Matt Jaffee
b6a953cade
cleanup groupby - more comments, remove panic, remove dup test 2018-10-16 19:56:54 -05:00
Matt Jaffee
38f459a6d4
add GroupBy(Rows(column)) test and fix comments 2018-10-12 18:58:27 -05:00
Matt Jaffee
a4edd39715
use intersectionCounts for final row of groupBy record
since we only need the counts and not the data, this optimization actually
provides enormous speedup (2x?) and massive decrease in allocations.

also in this commit (unfortunately), a bunch of renaming and documentation,
returning a GroupCount from the GroupBy iterator instead of a ppi (ppi is now
gone).

also added TODOs for tests and benchmarks
2018-10-12 15:30:25 -05:00
Matt Jaffee
07d279a155
implement mergeGroupCounts w/o map, remove dead code
move rowFilters to fragment.go

new mergeGroupCounts implementation takes limit into account while merging,
exploits inherent order of group count results.
2018-10-11 19:06:46 -05:00
Matt Jaffee
9d896c5d2f
implement alternate groupByIterator using fragment rowIterator
doesn't re-intersect the same rows for every record
2018-10-11 18:01:44 -05:00
Matt Jaffee
360623230f
get a somewhat better groupBy working that passes new tests
one test still fails due to reordering during merging
2018-10-10 21:03:45 -05:00
Matt Jaffee
603b0e5369
fix logic bug applying limit to group by rows
check in failing test showing how applying the limit to each rows query can
cause the query to falsely return no results
2018-10-09 19:27:10 -05:00
Matt Jaffee
36a539d24e
Merge branch 'master' into new-rows-iterate 2018-10-09 12:27:05 -05:00
Matt Jaffee
e2bbcb28e5
fix linter issues 2018-10-08 19:10:16 -05:00
Matt Jaffee
cbd7e945b2
get GroupBy working with "Rows" child calls, remove fieldDirectives
had to implement decoders for RowIDs and RowIdentifiers - a sign that we need
better testing of remote Rows calls
2018-10-08 19:04:29 -05:00
Matt Jaffee
c172ca0680
combine fragment.rows and rowsForColumn with generalized filter
use filter funcs with closures for state instead of methods on structs. seems a
bit cleaner.
2018-10-08 16:16:39 -05:00
Yuce Tekol
37d1cfbbd7
Updated with master 2018-10-05 22:07:01 +03:00
Travis Turner
051b71e540
ensure a Range() query with field keys is handled correctly 2018-10-05 11:30:47 -05:00
Yuce Tekol
b617db84eb
gfmt'ed 2018-10-05 17:44:02 +03:00
Travis Turner
338f69b71d
replace switch with simplified if statement 2018-10-05 08:45:07 -05:00
Travis Turner
3d33cdbb74
implement Store() in the executor (i.e. setRow()) 2018-10-05 08:45:07 -05:00
Yuce Tekol
bd48db1435
updated executor.Execute logic for columnAttrs with keys; added columnAttrs with keys test 2018-10-05 16:43:42 +03:00
Yuce Tekol
efed5ea3fc
Fixes #1632 2018-10-03 13:43:15 +03:00
Matt Jaffee
8cd82af2e7
remove extraneous fragment.rows* methods
variadic filters makes separate methods unnecessary
2018-10-02 09:31:13 -05:00
Matt Jaffee
4f3f2e1a49
remove noFilter and filterWithOffsetLimit
can use an empty list of filters and a list of offsetFilter followed by limit
filter respectively
2018-10-02 09:25:07 -05:00
Matt Jaffee
f94cd8ae7d
add translation code for GroupBy "previous" arg 2018-09-28 14:30:18 -05:00
Matt Jaffee
61089981a2
remove check for column in shard in executeRowsShard
the check happens in executeRows and frag.rowsForColumn will panic if given a
column id not in its shard.
2018-09-28 10:20:48 -05:00
Matt Jaffee
ed1b09a1cd
fix columnID<>shard checks in executor and fragment
fragment panics if rowsForColumn is called with a column id not in the
fragment's shard. The justification for this is that we're wasting resources if
we're sending requests for a specific column to any shard other than the one
which contains that column.
2018-09-28 10:17:53 -05:00
Matt Jaffee
93e9f242fe
test Rows call with row keys, fix column id problem 2018-09-27 17:07:15 -05:00
Matt Jaffee
78ff75690d
convert Rows to use previous/limit
pass previous+1 directly to fragment.rows so that the iterator can seek directly
to the start point. handle limit inside reduce so it can skip out early and
avoid extra allocation.
2018-09-27 16:14:40 -05:00
Matt Jaffee
ac98fcb6d4
rename RowIDs PQL to Rows 2018-09-26 16:09:05 -05:00
Matt Jaffee
4face45c2a
rename RowIDs methods to Rows 2018-09-26 16:03:26 -05:00
Travis Turner
506e6dcf51
change ClearRow validation to whitelist of field types 2018-09-24 16:03:50 -05:00