Commit Graph

26 Commits (3cab8fac0202b5640674b31997d3bcec30236766)

Author SHA1 Message Date
Nathaniel Cook 5cc7fa912e export interfaceValues since it is returned from the DisticntReduce function 2015-11-09 16:35:00 -07:00
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
Nathaniel Cook d338f38d65 update reduce func signatures to not have influxql.Call arguments 2015-10-15 09:24:16 -06:00
Nathaniel Cook d380ee37a2 tsdb.Iterator is no longer used. Removing 2015-10-06 10:34:07 -06:00
Ben Johnson 343dd23ee7 refactor map functions to use list of values
This commit changes `tsdb.mapFunc` to use `tsdb.MapInput` instead
of an iterator. This will make it easier and faster to pass blocks
of values from the new storage engine into the engine.
2015-09-29 14:00:33 -06:00
Cory LaNou 842b36f30f godoc 2015-09-23 15:52:44 -05:00
Cory LaNou b2474c9abf reduce arguments to MapTopBottom 2015-09-23 15:44:36 -05:00
Cory LaNou 81ad1f87a4 refactor MapTopBottom signature 2015-09-23 10:53:21 -05:00
Cory LaNou 7c3a542e13 revert signatures for mean/sum map funcs 2015-09-23 10:32:00 -05:00
Cory LaNou b1becfbcfc more tests, simplify mapFunc signatures 2015-09-23 09:27:19 -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
Nathaniel Cook 007508bde0 export tsdb.Iterator 2015-09-22 10:29:49 -06:00
Daniel Morsing 57b211a538 Merge branch 'master' into bottom
resolve changelog conflict
2015-09-21 12:31:29 +00:00
Daniel Morsing 5b24841973 rename topReduceOut
Also, gofmt
2015-09-18 15:04:09 +00:00
Daniel Morsing b5fc2a96b1 Implement bottom
After the rework of the ordering for top, this was just a matter
of adding a flag telling the minheap which way the values should
be sorted.
2015-09-18 14:39:46 +00:00
Daniel Morsing ce1dc840ef Better documentation for typeCompare. 2015-09-18 13:11:46 +00:00
Daniel Morsing d9e4b3b851 split comparison into 2 stages, one for type and one for value
Also, fix it so that heap inserts sort on tags as well.

This change makes it easier to implement bottom and also fixes the test that the previous change broke.
2015-09-17 14:59:02 +00:00
Daniel Morsing 59307b8b78 optimize top queries
Instead of rounding up the points, sorting and then slicing, keep a
heap that allows us to quickly see if the point needs to be in the
set. This cuts a top query on a dataset of 8 million points from 35
seconds to 11 seconds.
2015-09-16 17:02:44 +00:00
Daniel Morsing 51b22f180f simplify the sorting for top/distinct.
Instead of using closures and 2 different sort routines, have an
interface compare method that makes it easy to switch directions
for comparisons.

Note that this changes the sort order of distinct to match that of
top. While it is a change, I don't think it will break any code. The
important thing for distinct is just that the ordering is absolute,
not what the order is.
2015-09-15 15:03:31 +00:00
Daniel Morsing eb65f50593 gofmt 2015-09-11 14:41:59 +00: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
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