Commit Graph

138 Commits (e38a204afcdcce29058bcbeea2d9b418069d7ba6)

Author SHA1 Message Date
Jason Wilder d466533f20 Return a parse error for order by anything other than time
Order by time asc and desc are the only supported order by options
currently.  Tags, fields, or multiple order by fields will return
a parse error.
2015-09-03 22:31:58 -06:00
Jason Wilder 04a20566c1 Allow order by desc in parser 2015-09-03 22:28:35 -06:00
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
Philip O'Toole 78170bd798 Parse multiple tokens at once (NOT EXISTS) 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
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
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
David Norton debc3cc11c fix #3102: add authentication cache 2015-06-30 18:29:11 -04:00
Joseph Crail 5fccee3d16 Fix spelling errors in comments and strings. 2015-06-28 02:54:34 -04:00
Dejan Golja f133ceb350 Added support for SHOW GRANTS FOR USER syntax 2015-06-17 01:00:26 +10:00
Philip O'Toole cdf7188259 Only ORDER BY ASC is valid for now
Fix issue #2731
2015-06-11 00:51:44 -07:00
Paul Dix 4a1ce77090 Wire up DROP SERIES.
* Pulled over updates to ast and parser from master
* Updated store and shard to be able to drop series
* Pulled updates to database.go from master into tsdb/meta.go
2015-06-02 11:20:20 -04:00
Ben Johnson 75ab63b538 Refactor meta statement execution to meta.StatementExecutor. 2015-05-29 14:54:04 -06:00
Cory LaNou fc7d63ce61 validate methods can be private 2015-05-19 09:16:21 -06:00
Cory LaNou b9de38e7d4 support SELECT DISTINCT foo and SELECT distinct(foo) 2015-05-19 09:16:20 -06:00
Cory LaNou 06d40a2582 SELECT DISTINCT field -> SELECT distinct(field) 2015-05-19 09:16:20 -06:00
Cory LaNou b6b916edbc add distinct keyword 2015-05-19 09:16:19 -06:00
Cory LaNou bfdf05033d refactor validating select statement 2015-05-12 08:42:39 -06:00
Cory LaNou 93760c8679 update comment and changelog for count -> aggregate 2015-05-11 18:00:59 -06:00
Cory LaNou cebdfea737 any aggregate function that has a group by time without a where time clause should fail 2015-05-11 17:48:37 -06:00
Cory LaNou 0155f8bb6d hasWhereTime -> hasTimeDimensions 2015-05-11 17:48:21 -06:00
Cory LaNou 832ca01cd3 learn to spell claus 2015-05-11 17:48:21 -06:00
Cory LaNou 892a6e831b error out for invalid count group select without where time 2015-05-11 17:48:21 -06:00
ben hockey ce54004961 normalize Call.Name to be lowercase 2015-05-01 12:05:55 -05:00
David Norton 66b8cc02aa fix #2268: code review changes 2015-04-15 13:52:18 -04:00
David Norton 1e7b132f96 fix #2268: make ugly code pretty 2015-04-15 13:25:49 -04:00
David Norton 3739433f0c fix #2268: fix expression parsing bug
Parsing:

WHERE time > now() - 2d AND time < now() + 10d

generated an expression tree that evaluated as:

... AND (time < now()) + 10d

instead of:

... AND time < (now() + 10d)
2015-04-15 12:37:19 -04:00
Todd Persen ebd8ca7016 Merge pull request #2191 from influxdb/calls_case
Case-insensitive check for "fill"
2015-04-13 12:13:43 -07:00
Philip O'Toole bf1a8aa1e4 Use uint64 for Series IDs
Fixes issue #1649
2015-04-10 16:11:34 -07:00
David Norton a67e9a8a95 fix #2215: allow keyword default to be unquoted
InfluxDB creates a default retention policy named "default".  DEFAULT is
also a keyword in the language.  This required double quoting "default"
in the ALTER RETENTION POLICY statement.  This commit makes the parser
accept it unquoted for that one statement.
2015-04-09 16:37:20 -04:00
David Norton 25cea58635 refactor scanning & parsing of identifiers 2015-04-09 13:21:13 -04:00
Philip O'Toole f5b769781b Case-insensitive check for "fill" 2015-04-07 19:21:37 -07:00
Dejan Golja e1b9982401 Add support for SET PASSWORD FOR user = 'PASSWORD'
Added support for the set password for user, so we can update user
password via the new server administration commands
2015-04-04 14:16:54 +11:00
Todd Persen 94a8019fc7 Wire up DROP CONTINUOUS QUERY 2015-03-25 11:58:33 -07:00
Philip O'Toole 1c440f8542 Implement "SHOW DIAGNOSTICS" 2015-03-23 23:45:57 -07:00
Cory LaNou e2f33e354f clarify error message 2015-03-20 16:52:32 -06:00
Cory LaNou 3c8e830aa3 fixing tests 2015-03-20 16:51:41 -06:00
Cory LaNou dc0d8a35dc wip 2015-03-20 16:51:41 -06:00
Philip O'Toole dc297e8012 Correctly use IsRawQuery 2015-03-19 16:32:25 -07:00
Philip O'Toole 59f25910c6 IsRawQuery should be set via Walk() 2015-03-19 16:26:16 -07:00