Commit Graph

37 Commits (ed393398cd4e317be01cdb71764a83cea24b0a38)

Author SHA1 Message Date
Ben Johnson 28b585e639 refactor tsdb query engine
This commit refactors the tsdb query engine to use separate aggregate
and raw execution paths, encapsulates cursor functionality, and removes
the TagSetCursor from the aggregate path. By removing the TagSetCursor,
we can pass sets of unordered values to the map functions and bypass
the `container/heap` entirely.
2015-10-22 09:41:12 -06:00
Cory LaNou a2102e19ba always return time, never strings. fixes #4415 2015-10-15 20:19:58 -05:00
Cory LaNou 6787525912 fixes multiple selectors overwriting each other. fixes #4360 2015-10-12 21:40:57 -05:00
Jason Wilder 06c143c2dd Handle missing values in aggregate derivative queries better
If an aggregate derivative query did not have a value in the first
time bucket, it would abort early and return a single row with value
of 0.  Similarly, if either the current or previous value was nil,
it would skip the row and not append any values causing gaps and
no data to show up.

Instead, this will append a nil value if either the current or previous
valis is nil.  This essentially allows nil values to carry through the
results as well as gives a more sensible value for rows where we cannot
compute a difference (instead of dropping the row as before).

Fixes #4237 #4263
2015-10-01 13:05:19 -06:00
Cory LaNou 715e3d8d3c add comment to clarify 2015-09-23 15:49:17 -05:00
Cory LaNou 6b19e3dd9c minor refactorings 2015-09-23 09:47:24 -05:00
Cory LaNou 78bc740434 full support for min/max/first/last 2015-09-23 09:03:57 -05:00
Ben Johnson 1b8b625787 refactor SelectMapper 2015-09-22 13:09:26 -06:00
Ben Johnson 0883182798 simplify select mapper stmt 2015-09-22 12:27:14 -06:00
Cory LaNou ba830be3b9 actually move influxql.Row* -> models.Row* 2015-09-16 16:32:50 -05:00
Daniel Morsing ab9ae468ca unexport some functions
For good measure basically. Not needed for correctness, but it keeps
people from using these.
2015-09-11 14:39:09 +00:00
Daniel Morsing 66fc270d1e Move aggregate funcs into tsdb
Pure move, No functional changes.
2015-09-11 14:27:47 +00:00
Cory LaNou fa4415b3a4 refactor processing top/bottom results. clarify some comments 2015-09-04 13:30:43 -05:00
Cory LaNou 08295c578f refactor processTopBottom 2015-09-04 13:30:42 -05:00
Cory LaNou 9ab3d89c06 bucketTime* -> tMin* 2015-09-04 13:30:42 -05:00
Cory LaNou 347ffc70b4 wire up advanced top sorting/slicing 2015-09-04 13:30:41 -05:00
Cory LaNou 8c4595b345 top is coming together. filling out fields properly 2015-09-04 13:30:41 -05:00
Cory LaNou ba79007960 wip 2015-09-04 13:30:41 -05:00
Cory LaNou 35b9215aa9 refactor processTopBottom - wip 2015-09-04 13:30:40 -05:00
Cory LaNou 046282249a wip remapping top output 2015-09-04 13:30:40 -05:00
Jason Wilder e767feb8d9 Fix order by desc with aggregate function not return any values 2015-09-03 22:31:58 -06:00
Jason Wilder 266bdc1c2b Support sort by time DESC in wal and bz1 engines 2015-09-03 22:28:36 -06:00
Daniel Morsing c4092d7fc3 Revert "move aggregate functions" 2015-09-02 10:47:58 -07:00
Daniel Morsing 34744b647d unexport some functions
For good measure basically. Not needed for correctness, but it keeps
people from using these.
2015-09-01 14:58:55 -07:00
Daniel Morsing 65340a023b Move aggregate funcs into tsdb
Pure move, No functional changes.
2015-09-01 14:25:59 -07:00
David Norton 88f556af72 convert SHOW MEASUREMENTS to a distributed query 2015-08-23 23:09:51 -04:00
David Norton c8f88f9a61 refactor remote mapping 2015-08-22 10:16:41 -04:00
Philip O'Toole deabf8d2a8 Minor GoDoc fix 2015-08-17 11:26:12 -07:00
Philip O'Toole 7e72a1a6b9 Precompute cursor keys
CPU profiling shows that computing the tagset-based key of each point is significant CPU cost. These keys actually don't change per cursor, so precompute once at mapper-open time, and then use those values as points are drained from the cursor.

Before this change the cursor tag was getting computed on every point, which involved marshalling tags.
2015-08-14 20:02:21 -07:00
Philip O'Toole 2a77726f94 No need to list, just take map's size
A particular test query goes from 2 minutes 40 seconds to 1 minute 25
seconds.
2015-08-14 16:00:12 -07:00
Cory LaNou 7fdb682966 first pass at raw queries with tags 2015-08-14 15:05:26 -05:00
Cory LaNou dc83c57d7e more wip 2015-08-14 15:05:26 -05:00
Cory LaNou 8ea3c47747 wip 2015-08-14 15:05:26 -05:00
Jason Wilder d4ce2f9048 Fix panic when running derivative on non-numeric values
Fixes #3401
2015-08-10 12:45:34 -06:00
Cory LaNou b19a8f3968 Fix alias, maintain column sort order 2015-08-06 14:01:03 -05:00
David Norton d661bf1a06 fix #3414: shard mappers perform query re-writing 2015-08-04 09:49:50 -04:00
Ben Johnson 4dc15a833e rename engine.go to executor.go 2015-07-22 11:07:06 -06:00