Commit Graph

65 Commits (a78da51b7c50817d8c32e5ebad57577fe17bf299)

Author SHA1 Message Date
Edd Robinson 7644ab1fc4 Fix race in test helpers. Fixes #8177 2017-03-29 12:31:04 +01:00
Jonathan A. Sternberg 7e0ed1f5e5 Ensure the input for certain functions in the query engine are ordered
The following functions require ordered input but were not guaranteed to
received ordered input:

* `distinct()`
* `sample()`
* `holt_winters()`
* `holt_winters_with_fit()`
* `derivative()`
* `non_negative_derivative()`
* `difference()`
* `moving_average()`
* `elapsed()`
* `cumulative_sum()`
* `top()`
* `bottom()`

These function calls have now been modified to request that their input
be ordered by the query engine. This will prevent the improper output
that could have been caused by multiple series being merged together or
multiple shards being merged together potentially incorrectly when no
time grouping was specified.

Two additional functions were already correct to begin with (so there
are no bugs with these two, but I'm including their names for
completeness).

* `median()`
* `percentile()`
2017-03-28 13:55:37 -05:00
Jonathan A. Sternberg 24109468c3 Merge pull request #8168 from influxdata/js-8167-math-with-multiple-selectors
Fix a regression when math was used with selectors
2017-03-28 13:31:57 -05:00
Jonathan A. Sternberg 3e52ec7ca2 Merge pull request #7762 from influxdata/js-6541-timezone-support
Support timezone offsets for queries
2017-03-28 10:39:07 -05:00
Jonathan A. Sternberg b14c292cba Fix a regression when math was used with selectors
If there were multiple selectors and math, the query engine would
mistakenly think it was the only selector in the query and would not
match their timestamps.

Fixed the query engine to pass whether the selector should be treated as
a selector so queries like `max(value) * 1, min(value) * 1` will match
the timestamps of the result.
2017-03-27 14:12:15 -05:00
Jonathan A. Sternberg 347b01814e Support timezone offsets for queries
The timezone for a query can now be added to the end with something like
`TZ("America/Los_Angeles")` and it will localize the results of the
query to be in that timezone. The offset will automatically be set to
the offset for that timezone and offsets will automatically adjust for
daylight savings time so grouping by a day will result in a 25 hour day
once a year and a 23 hour day another day of the year.

The automatic adjustment of intervals for timezone offsets changing will
only happen if the group by period is greater than the timezone offset
would be. That means grouping by an hour or less will not be affected by
daylight savings time, but a 2 hour or 1 day interval will be.

The default timezone is UTC and existing queries are unaffected by this
change.

When times are returned as strings (when `epoch=1` is not used), the
results will be returned using the requested timezone format in RFC3339
format.
2017-03-22 15:09:41 -05:00
Jonathan A. Sternberg 33981277bc Fix the time range when an exact timestamp is selected
There is a lot of confusion in the code if the range is [start, end) or
[start, end]. This is not made easier because it is acts one way in some
areas and in another way in some other areas, but it is usually [start,
end]. The `time = ?` syntax assumed that it was [start, end) and added
an extra nanosecond to the end time to accomodate for that, but the
range was actually [start, end] and that caused it to include one extra
nanosecond when it shouldn't have.

This change fixes it so exactly one timestamp is selected when `time = ?`
is used.
2017-03-21 14:55:31 -05:00
Jason Wilder e62c72d1f9 Merge branch '1.2' into jw-merge-12 2017-03-14 15:15:50 -06:00
Jason Wilder 675d7c9d65 Merge branch '1.2' into jw-merge12 2017-03-06 11:09:05 -07:00
Jason Wilder 524169b814 Move integration tests to tests dir 2017-02-15 10:37:29 -07:00
Jason Wilder 4c3f605256 Remote everything in tests dir
Lots of old cruft.  Integeration tests will be moved here shortly.
2017-02-15 10:13:49 -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
Jason Wilder 3eb82d529e Update test scripts to use measurement for JSON 2015-06-02 20:44:11 -06:00
Ben Johnson 44d38cb430 Merge branch 'master' into alpha1 2015-06-02 10:40:52 -06:00
Cory LaNou 17bdf1c114 get both json/line protocol endpoints working 2015-06-01 12:35:57 -06:00
Cory LaNou 3597565955 reading and writing yo! 2015-06-01 11:59:58 -06:00
David Norton 0fb4e14c44 fix #2564: chg name to measurement in write JSON 2015-05-21 19:05:32 -04:00
Cory LaNou 531f1e72ce add in non-distinct data to distinct seed 2015-05-19 12:29:52 -06:00
Cory LaNou dbacec690d remove trailing spaces 2015-05-19 09:16:20 -06:00
Cory LaNou c8bf5e2ee8 add bool scenarios to distinct data script 2015-05-19 09:16:19 -06:00
Cory LaNou 639311b00b some test data for working with distinct at the cli 2015-05-19 09:16:19 -06:00
ben hockey 9a3c28748c change timestamp to time 2015-05-11 12:28:47 -05:00
Cory LaNou 13f318b084 Allow http write handler to decode gzipped body 2015-04-07 10:34:55 -05:00
Cory LaNou 4e8b98702a properly submit gzipped data. 2015-04-06 15:38:14 -07:00
Cory LaNou 63ded4f3f5 update test script to read and write with gzip compression 2015-04-06 15:38:14 -07:00
Cory LaNou 3854fdfb82 Add script to show how to query for future data 2015-04-03 10:33:40 -05:00
Ben Johnson 8648f6d5e7 Add -host option to urlgen. 2015-03-16 11:27:27 -06:00
Ben Johnson 4b9a93d924 Merge branch 'master' of https://github.com/influxdb/influxdb into stateless-broker 2015-03-12 15:46:04 -06:00
Ben Johnson c7d49209e1 Update urlgen to end at current time. 2015-03-12 15:04:36 -06:00
Cory LaNou 2e9d56ff99 add shell script to input data with more variety 2015-03-12 11:17:08 -06:00
Ben Johnson 5f6bcf523f Fix broker integration bugs. 2015-03-11 12:00:45 -06:00
Joseph Rothrock 94d4287af9 rewrite urlgen in go
Fix outer enclosing json.

Add date option.
2015-03-03 12:57:01 -08:00
Joseph Rothrock b020d3f14c Rewrite urlgen in Go
Cut-n-paste Ben's code.

Fix bugs re args.

Sandardize on 1-based for time and servers.

Keep incrementing time for subsequent clients -- I don't see the
point in overwriting data.
2015-03-03 11:36:15 -08:00
Joseph Rothrock bdbb2a7503 Rewrite urlgen in Go
Issue: 1818

This is meant to replace the urlgen shell script.
2015-03-02 16:35:33 -08:00
Mark Rushakoff 666d093676 Fix urlgen to work on Ubuntu 2015-02-27 16:05:53 -08:00
Joseph Rothrock 06eac99c23 Fix timezone abbreviation.
Issue: 1784

BSD manpage for strptime sez that they don't like
most timezone abbreviations. One they do like is GMT.
2015-02-27 15:37:39 -08:00
Cory LaNou 1f38c0865e enhancing test to work with drop series bug 2015-02-26 17:10:09 -07:00
Cory LaNou 18d064afbc chmod +x tests/create_write_single_with_multiple_tags_query.sh 2015-02-24 17:11:14 -07:00
Cory LaNou d03fcbb7cf add shell test that inserts multiple tags 2015-02-24 17:01:16 -07:00
Cory LaNou 3551856566 Update tests to insert with fields, not values 2015-02-24 10:32:39 -07:00
Cory LaNou f19276d365 clarifying echo message 2015-02-04 16:22:12 -07:00
Cory LaNou 9fbdd33fae and integration test that validates gzip 2015-02-04 16:20:28 -07:00
Cory LaNou 78ed56a416 add more curl seed scripts, update tmux test to use dedicated seed script 2015-02-04 13:52:47 -07:00
Cory LaNou fa675c4181 update test 2015-02-04 10:25:38 -07:00
Ben Johnson 98421f6ccc Merge branch 'master' into batch
Conflicts:
	server.go
	tests/siege/urlgen
2015-02-02 20:57:05 -07:00
Paul Dix 4ce5a637bb Rename create_write_query and make executable. 2015-01-29 21:34:52 -05:00
Peter C. Norton f5247cb8f3 Remove more ksh/bash-isms 2015-01-29 13:01:55 -05:00
Peter C. Norton 1b645b0d52 Fix tests/seige/urlgen for non-macs
Should address https://github.com/influxdb/influxdb/issues/1437
2015-01-29 12:08:49 -05:00
Ben Johnson b1417eaeb9 Update urlgen to do batching. 2015-01-29 02:13:57 -05:00
Ben Johnson 1d587f9c1d Add siege script and url generation. 2015-01-29 01:10:10 -05:00