Commit Graph

9295 Commits (627cd9d486b98af01f02f0915319185a81b46c87)

Author SHA1 Message Date
Ben Johnson 627cd9d486 add dedupe iterator 2016-02-10 09:40:29 -07:00
Jonathan A. Sternberg 21d2a4c3de Sort MergeIterator by tags after name and before the window 2016-02-10 09:40:28 -07:00
Ben Johnson 47c2bab74b add SHOW TAG KEYS support 2016-02-10 09:40:28 -07:00
Ben Johnson 607750ab1b add SHOW MEASUREMENTS iterator 2016-02-10 09:40:28 -07:00
Jonathan A. Sternberg 86cec8cea5 Fix reduce slice iterators to also separate by name 2016-02-10 09:40:28 -07:00
Jonathan A. Sternberg d8337acf90 Emit all points of a certain name for MergeIterators
When multiple sources are used, emit all points for a certain source
(like cpu) before another source (like mem) regardless of which window
they are in. If the sources are the same, then sort by window.

Continue to ignore tags since we don't need to sort nicely by tags with
a MergeIterator, only SortedMergeIterator.
2016-02-10 09:40:28 -07:00
Jonathan A. Sternberg c602503c7c Fix reduce iterators to separate by name
Previously reduce iterators just separated points by tags. If you had
identical tags but different names, it would group those together so you
could have these two points:

    cpu value=1
    mem value=2

When you performed a `mean(value)` call and included both cpu and mem as
sources, it would return one mem series with a value of 1.5 instead of
two serieses.
2016-02-10 09:40:28 -07:00
Ben Johnson 2bdc9404ef revert meta execution 2016-02-10 09:40:28 -07:00
Jonathan A. Sternberg 5605bbb22e Implement casting support for different iterator types
Out of a list of iterators, an overarching iterator type is chosen and
only iterators of that type are returned for the merge iterator. If a
type can be cast to another type, an extra cast iterator is created to
handle that casting.

The only supported cast is from integers to floats.
2016-02-10 09:40:28 -07:00
Jonathan A. Sternberg dbb9b36d84 Support integers with top() and bottom() and fix point ordering
top() and bottom() point ordering was incorrect and using an inefficient
method of sorting. It has now been updated to use a heap and ordering is
being done by value first and time second (with earlier times always
taking priority).

Removed unit tests that test using `time` inside of the query to get the
real time instead of the interval time and only allowing the default
behavior. We will have another mechanism to get the real time during an
interval, but the current method is deprecated.

The top() and bottom() methods now have integer support.
2016-02-10 09:40:27 -07:00
Jonathan A. Sternberg f41070fb56 Additional test coverage for point 2016-02-10 09:40:27 -07:00
Jonathan A. Sternberg a1cdc71ae5 Add binary expr tests to influxql package
No boolean operator tests because the parser doesn't currently allow it.
I am currently keeping the code that performs this for now until we
decide whether to allow boolean operators inside of a select clause. It
would be easy to have the new query engine do something like this:

    SELECT mean(value) < 10 FROM cpu GROUP BY time(1m)

And then you would have it return true or false for each interval, but
the same can be done through a where clause too.
2016-02-10 09:40:27 -07:00
Jonathan A. Sternberg f7a3918e40 Basic testing for binary expressions
Use Iterators().ReadAll() in select unit tests.
2016-02-10 09:40:27 -07:00
Ben Johnson a0fe0ca437 fix new query engine test regressions 2016-02-10 09:40:27 -07:00
Ben Johnson 6204350d65 fix math operations 2016-02-10 09:40:27 -07:00
Ben Johnson b4cb770a7f refactor aux iterators 2016-02-10 09:40:27 -07:00
Jonathan A. Sternberg 43ae104e31 Additional test coverage for DataType 2016-02-10 09:40:27 -07:00
Jonathan A. Sternberg 8e925065a0 Remove the join iterator since it is no longer used 2016-02-10 09:40:27 -07:00
Jonathan A. Sternberg aa3c8d69b8 Additional select tests for influxql 2016-02-10 09:40:26 -07:00
Jonathan A. Sternberg 76b49b3ab3 Fixed a bug in first() and last() where the time was lost
last() would always return the last output of the iterator (which isn't
necessarily the last time value due to how the merge iterator works) and
first() would always return the first output of the iterator (wrong for
the same reason).

Now the time is kept by the reduce function and the times are wiped as
part of the reduce iterator after the value has been found.
2016-02-10 09:40:26 -07:00
Jonathan A. Sternberg 67c1042435 More work 2016-02-10 09:40:26 -07:00
Jonathan A. Sternberg 0e1910cb92 More work on improving the iterator unit tests 2016-02-10 09:40:26 -07:00
Jonathan A. Sternberg 3dd6aa17f3 Test the merge iterator for every type instead of just floats 2016-02-10 09:40:26 -07:00
Jonathan A. Sternberg 03ad7a4e40 Move the integerReduceSliceFloatIterator to call_iterator.go
It matches more in functionality to the functions in call_iterator.go
than iterator.go. iterator.go mostly has base iterators and
call_iterator.go has iterators related to functional calls, which is
the only time integerReduceSliceFloatIterator is used.
2016-02-10 09:40:26 -07:00
Jonathan A. Sternberg fa79aae584 Expanding test coverage for the influxql/iterator.go
SortedMergeIterator is now tested and all of the IteratorOptions methods
are now tested explicitly for functionality.
2016-02-10 09:40:26 -07:00
Ben Johnson b8918a780c integer support 2016-02-10 09:40:25 -07:00
Jonathan A. Sternberg e7d39092d2 Updating the unit tests for TestServer_Query_Aggregates_IntMany_GroupBy
It had the time values for the selectors being returned equal the actual
points time. We have decided to have the time always be the interval
time and adding another feature later that can return the selected
point's time in the future.
2016-02-10 09:40:25 -07:00
Jonathan A. Sternberg 583477064c Check for `tsdb.EOF` when looking for the lowest timestamp of aux fields 2016-02-10 09:40:25 -07:00
Jonathan A. Sternberg 34f14424dd Filter tags from the condition when building cursors on tsm1 2016-02-10 09:40:25 -07:00
Jonathan A. Sternberg 97752df03d Repair regressions in derivatives with group by tests
Also fixes the `first()` and `last()` calls to do the same thing as
`min()` and `max()` by returning the time corresponding to the start of
the interval rather than the point's real time.
2016-02-10 09:40:25 -07:00
Jonathan A. Sternberg be22097338 Reset the iterator duration to zero when no interval is used 2016-02-10 09:40:25 -07:00
Jonathan A. Sternberg e0ac29dd2d Implement most of top() and bottom()
This does not implement the time selector, but everything else is
implemented. Unfortunately, there are no tests for bottom() in the old
query engine, so only top() is properly tested.
2016-02-10 09:40:25 -07:00
Ben Johnson 00806de9b8 refactor query engine 2016-02-10 09:40:25 -07:00
Ben Johnson 0ad9c31169 simple derivative 2016-02-10 09:40:24 -07:00
Ben Johnson 57336bd6ee fix conditionals 2016-02-10 09:40:24 -07:00
Ben Johnson 60b051ee88 LIMIT/OFFSET 2016-02-10 09:40:24 -07:00
Ben Johnson 036382ee20 SLIMIT/SOFFSET 2016-02-10 09:40:24 -07:00
Ben Johnson cde973f409 refactor query engine 2016-02-10 09:40:24 -07:00
Edd Robinson bb9eed941e Merge pull request #5590 from influxdata/er-sub-panic
Fixes #5545
2016-02-10 10:46:22 +00:00
Edd Robinson bcc46171cf Address some lint issues 2016-02-10 08:52:08 +00:00
Ross McDonald 887df3c730 Merge pull request #5600 from bwolf/buildpy-pkg-arch-fixes
Fix handling of build.py --pkgarch.
2016-02-09 15:12:12 -06:00
Edd Robinson cfbb219e49 Fixes #5545 2016-02-09 18:41:26 +00:00
Edd Robinson c8210a6ed4 Merge pull request #5586 from otoolep/tweak_tsm_output
Make it clear what the trailing parallel factor is
2016-02-09 18:39:53 +00:00
Edd Robinson f0afa35d0e Merge pull request #5535 from nicgrayson/patch-1
Update README.md for Collectd
2016-02-09 18:39:04 +00:00
Marcus Geiger 9974a6a4d2 Fix handling of build.py --pkgarch.
--pkgarch overrides the architecture which is used in subsequent runs to
build different packages (deb,tar.gz,rpm) and the architecture is used
to index the build information kept in a dict, which of course fails if
it has been overridden. This commit resets the overridden architecture
after each run of fpm to initial, in order to fix the packaging.
2016-02-09 18:39:46 +01:00
Nic Grayson 87deeb6348 fixed grammar/typos in collectd section of docs 2016-02-09 10:32:43 -06:00
Nic Grayson 3a12b2e392 fixed grammar/typos in collectd section of docs 2016-02-09 10:31:57 -06:00
Jason Wilder aacacbc4c3 Update changelog
[ci skip]
2016-02-09 09:25:09 -07:00
Jason Wilder 83b96b35e9 Merge pull request #5419 from m4ce/master
Adding support for matching tags multiple times in Graphite parser
2016-02-09 09:23:54 -07:00
Jason Wilder efc5de0bf4 Update changelog
[ci skip]
2016-02-09 09:19:49 -07:00