Commit Graph

9482 Commits (2ab79e75eb7d3449eebe67d234f60208e69da8f4)

Author SHA1 Message Date
Jason Wilder 8a39123ed2 Update changelog
[ci skip]
2016-02-10 12:13:46 -07:00
Jason Wilder a51af5c112 Merge pull request #5598 from PSUdaemon/client_ping
Add Ping() to v2 client.
2016-02-10 12:11:42 -07:00
Ben Johnson d9a6a7340f add canonical paths 2016-02-10 11:30:52 -07:00
Jason Wilder 2212c32108 Merge pull request #5604 from jonseymour/typo
typo: databse -> database
2016-02-10 11:04:39 -07:00
Ben Johnson 5a0d1ab7c1 rename influxdb/influxdb to influxdata/influxdb
This commit changes all the import and URL references from:

    github.com/influxdb/influxdb

to:

    github.com/influxdata/influxdb
2016-02-10 10:26:18 -07:00
Chris H (CruftMaster) b3fd0ef737 Rebase to new changes in master 2016-02-10 17:07:34 +00:00
Ben Johnson 29c2dbc623 Merge pull request #5196 from benbjohnson/query-engine
Query Engine
2016-02-10 09:54:26 -07:00
Chris H (CruftMaster) abe29bfaf1 Warning in readme.md 2016-02-10 16:51:05 +00:00
Jonathan A. Sternberg d79eb29a23 Add documentation comments to influxql.Series and influxql.SeriesList 2016-02-10 09:40:31 -07:00
Jonathan A. Sternberg 98810a363a Correct the AuxIterator test and adding some additional locks
The additional locks shouldn't be necessary due to how the code is used,
but should prevent any potential data races in case we accidentally do
something bad.
2016-02-10 09:40:31 -07:00
Jonathan A. Sternberg ed151598ff Modify the AuxIterator to include a Start method
The AuxIterator streams points to the underlying iterators. When it
started automatically, race conditions occurred between the stream
closing the iterators and creating iterators from the AuxIterator.
2016-02-10 09:40:30 -07:00
Ben Johnson b3d5aa82b7 improve performance of LIMIT with no dimensions 2016-02-10 09:40:30 -07:00
Jonathan A. Sternberg 2e7cf5328c Fix go vet issues on 1.4
go 1.5 was being used to develop the query engine branch, but we aren't
using 1.5 for master at the moment. This fixes issues that go vet brings
up in 1.4 that don't exist in 1.5.
2016-02-10 09:40:30 -07:00
Jonathan A. Sternberg ae2d894671 Improved influxql package code coverage to 70% 2016-02-10 09:40:30 -07:00
Ben Johnson 5c33b9d786 remove Mapper test references 2016-02-10 09:40:30 -07:00
Ben Johnson d1b9e7048f InfluxQL README 2016-02-10 09:40:30 -07:00
Jonathan A. Sternberg dd3c75ef1c Remove a bad query test from the integration tests
We no longer throw this error and an empty result is appropriate since
there are no values in that interval.
2016-02-10 09:40:30 -07:00
Jonathan A. Sternberg 5c9cdd05c2 Modify the fill iterator to not produce empty name/tags for a time range
If a name/tag combination does not have any points in the time range at
all, fill will not generate points for it.
2016-02-10 09:40:30 -07:00
Jonathan A. Sternberg 5b756e0fbe Improve test coverage in influxql package 2016-02-10 09:40:29 -07:00
Jonathan A. Sternberg 43f34481e1 Fixed the final two failing tests in influxql 2016-02-10 09:40:29 -07:00
Jonathan A. Sternberg d1f7c445e7 Modify iterators to work across shards
Aux iterators now ask the iterator creator what series will be returned
and determine which aux fields to create based on the results.

The `tsdb.Shards` struct also creates a call iterator around the
iterators returned from each shard.
2016-02-10 09:40:29 -07:00
Ben Johnson 08f823546d fix rebase issue 2016-02-10 09:40:29 -07:00
Ben Johnson 32be4c250f fix non-existent shard handling
This commit removes `nil` shards returned from `tsdb.Store.Shards()`
which caused panics in some SELECTs. This can occur if the meta
store has created shards before the store or if the shards are
distributed throughout a cluster.

Fixes #5555
2016-02-10 09:40:29 -07:00
Jonathan A. Sternberg c2d1206177 Implement the fill iterator
Fill requires an additional function for IteratorCreator to retrieve the
series that will be returned from the iterator. When fill is required
for an aggregate, the IteratorCreator will be asked what series will be
returned by the created iterator.
2016-02-10 09:40:29 -07:00
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