Commit Graph

463 Commits (5f314d80e7fcd6044f5cac0d8a3d64dbc41ef204)

Author SHA1 Message Date
Ben Johnson bbc5539517 add SHOW SHARDS statement
This commit adds the ability to list all shards in the cluster
and return their id, start time, end time, expiry time, and
owner ids. Shards are grouped by database.

Fixes #3562
2015-09-03 15:46:52 -06:00
David Norton 6e6b5c4e70 remove debugging statements 2015-09-03 07:12:15 -04:00
David Norton dc968eae59 fix #255: revert Measurement parent 2015-09-03 07:12:15 -04:00
David Norton 816c5f5368 fix #2555: don't normalize target names 2015-09-03 07:12:15 -04:00
David Norton 99a22c174b fix #2555: add backreference in CQs
Add new query syntax to allow the following in CQs:

INTO "1hPolicy".:MEASUREMENT
2015-09-03 07:12:15 -04:00
Daniel Morsing c4092d7fc3 Revert "move aggregate functions" 2015-09-02 10:47:58 -07:00
Daniel Morsing 65340a023b Move aggregate funcs into tsdb
Pure move, No functional changes.
2015-09-01 14:25:59 -07:00
Paul Dix 040fa060df Add more detailed logging for compactions 2015-09-01 09:52:20 -04:00
Daniel Morsing 841e6fc6b5 Merge pull request #3908 from influxdb/firstopt
only look at the first value for first()
2015-08-31 14:21:29 -07:00
Daniel Morsing 8ca8293d11 only look at the first values for first()
Since we set up the aggregate queries so that iterator is ordered,
we only need to look at the first value. This cuts about 10 seconds
off a large single series query running first.
2015-08-31 13:43:28 -07:00
Philip O'Toole 78170bd798 Parse multiple tokens at once (NOT EXISTS) 2015-08-29 09:56:15 -07:00
Philip O'Toole 5ae004d062 Update INFLUXQL keywords
[ci skip]
2015-08-29 09:56:15 -07:00
Philip O'Toole 1228c985ea Parser support for CREATE DATABASE IF NOT EXISTS 2015-08-28 19:04:50 -07:00
David Norton 3c45838c10 update INFLUXQL.md 2015-08-27 08:38:16 -04:00
Philip 45cc51edfe During first() and last(), break any tie by value
If 2 or more points during this map-and-reduce share the same timestamp,
the tie is broken by looking at the value. This ensures that these
functions operate in a deterministic manner.

This solution due to @jwilder
2015-08-25 22:26:03 -07:00
Philip O'Toole e032242d83 Refine implementation, sole time is invalid 2015-08-21 12:14:53 -07:00
Philip O'Toole a45d46aac3 Add parser-level test for SELECT on time 2015-08-21 12:14:39 -07:00
Philip O'Toole 7a2f0a89bb SELECT on time should return error
Fixes #3010.
2015-08-21 12:14:39 -07:00
Daniel Morsing e2db51e4d5 Merge pull request #3721 from influxdb/timeliteral
interpret number literals compared against time as nanoseconds from epoch
2015-08-18 14:31:53 -07:00
Daniel Morsing 59ee00ba0d interpret number literals compared against time as nanoseconds from epoch
fixes #3719
2015-08-18 14:20:20 -07:00
Philip O'Toole 487c336571 Correctly merge rows for identical series
If no chunking was requested by the user, the co-ordinating node buffers all
results in RAM before emitting a single result. However buffering was not
merging results for rows which had data for the same series. This change fixes this.

Fixes issue #3242.
2015-08-17 13:43:17 -07:00
Cory LaNou 1f7f977c5e minor refactorings based on pr feedback 2015-08-14 15:05:26 -05:00
Cory LaNou 8ea3c47747 wip 2015-08-14 15:05:26 -05:00
Philip O'Toole d0993c5e3f Unit-test detection of agggregate and raw queries 2015-08-11 12:25:06 -07:00
Philip O'Toole 4770451837 Return error if queries mix aggregate and raw
Fixes issue #3198
2015-08-11 11:59:04 -07:00
Philip O'Toole 18589e20e6 Force all values to Float64 for math
Any literal values in a math query e.g. the '2' in 'value * 2' are
stored as float64, so all other values must be cast to this type. This
does mean that precision may be lost if the integer values are greater
than 2^53.
2015-08-10 13:13:04 -07:00
Cory LaNou b19a8f3968 Fix alias, maintain column sort order 2015-08-06 14:01:03 -05:00
Cory LaNou 101a580e02 do not allow wildcards with fields in select statements 2015-08-06 12:15:08 -05:00
Daniel Morsing fc4246d7f5 be more strict about identifier printing
When stringifying a query, we would print the identifier bare most
of the time. This caused issues when stringifying an identifier
that contained elements of syntax. For example, querying for the
value "in-bytes" would fail because the mapper would serialize it to
in-bytes and would parse it as an expression. Same problem occured
when using keywords as identifier names, such as select or in.

Fixes #3547
2015-08-05 17:40:42 +01:00
Daniel Morsing 6797270403 check if fields are valid during parse.
Binary expressions that yield a boolean are invalid and we can catch
these at parse time.

Fixes #3525
2015-08-04 16:02:35 +01:00
David Norton 0b248e225c Fix aggregate queries and time precision on where clauses. 2015-07-29 15:54:55 -04:00
Gunnar 96575e678a Merge pull request #3427 from influxdb/ga-pw-log
Logging tweaks, sanitize passwords and note if authentication is enabled
2015-07-23 14:12:41 -07:00
Haneysmith, Nathan fb32358216 Merge branch 'master' of https://github.com/influxdb/influxdb into show_policy_tweak 2015-07-23 10:36:08 -07:00
Haneysmith, Nathan 2c896cbcd8 docs tweaks for new syntax show retention policies 2015-07-22 15:46:42 -07:00
Josh Horwitz 96938e8a2b Added check for escaped single quote in string 2015-07-22 17:47:48 -04:00
Jason Wilder c8e17cb4b2 Fix querying fields with spaces and quotes 2015-07-22 14:50:14 -06:00
Philip O'Toole 42b4a0b8bf string return is totally unused 2015-07-22 02:55:13 -07:00
Philip O'Toole 45dcf9960c Optimize the very inner loop of cursor iteration
This change moves tracking of next timestamp and values to simple
slices, as performance measurement showed that Peek() on TagSet cursors
was a huge performance drain. There is much more that can be done here,
but with this in place query performance has been restored to 0.9.1
levels.

This change also uses -1 to indicate that no value is available for a
given timestamp.
2015-07-22 02:55:09 -07:00
gunnaraasen acc277ec8e Redact passwords from create user and set password statements 2015-07-21 17:53:21 -07:00
gunnaraasen eca76ed7a3 Parser fix, only allow ORDER BY clause with time ASC 2015-07-21 12:07:56 -07:00
Philip O'Toole f549910a18 Merge pull request #3279 from LK4D4/fix_style_else
Fix style issues with else
2015-07-17 11:53:42 -07:00
gunnaraasen 9ba37325f6 Fixes authorization.
Adds GRANT and REVOKE statements for admin privilege. Adds authorization to the query endpoint.
2015-07-17 11:33:06 -07:00
Alexander Morozov 675eacbf2c Fix style issues with else
In go it's better to just continue flow without "else", if it is return in
"if" statement.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-07-17 11:10:23 -07:00
Robert Nubel 930a1aa523 Require a regex after a regex operator when parsing.
Previously, parseRegex could return an empty RegexLiteral
and the expression parser would put that into the right-hand
side of the expression, causing a nil-pointer panic when
the query was later executed. This change adds a check at
the parsing level and returns an error message if a regex
operator (e.g. =~) is not followed by an actual regex.
2015-07-17 11:02:45 -07:00
gunnaraasen ee8ba11c4f Add ON token to SHOW RETENTION POLICIES parser with tests 2015-07-16 13:45:50 -07:00
Philip O'Toole 74cb96646c Refactor query engine for distributed query support
With this change, the query engine code gathers information about
shards and tagsets by working with individual shards, collating the
information, and returning that to the client. It does not assume that any
particular shard is local, and accesses all shards through abstracted
Mappers, of which there are two types -- a Mapper type for Raw queries
and a second type for Aggregate queries. There are corresponding
Executors for each type of Mapper, but both types of Executors share the
same interface.
2015-07-15 12:54:55 -07:00
Philip O'Toole 3967ec02d0 Add SLIMIT and SOFFSET to string version of AST 2015-07-15 09:43:24 -07:00
David Norton debc3cc11c fix #3102: add authentication cache 2015-06-30 18:29:11 -04:00
Jason Wilder 258f0fcdfa Merge pull request #3150 from dahankzter/master
Code style fix after review of #2956
2015-06-29 16:15:39 -06:00
Joseph Crail 5fccee3d16 Fix spelling errors in comments and strings. 2015-06-28 02:54:34 -04:00