Commit Graph

153 Commits (5c1ba44c9b6f35b8997feeadc997544de9032df1)

Author SHA1 Message Date
Cory LaNou 05f69b3d6c Validate Dimension for proper time scenarios. Fixes #3902 2015-09-10 13:10:21 -05:00
Cory LaNou 59ef75a183 Allow wildcards without abandon! Fixes #3978 2015-09-09 15:27:15 -05:00
Cory LaNou 6a3bedc0e1 add additional parser test for top function with tags 2015-09-04 13:30:42 -05:00
Cory LaNou d060f3aba9 move all aggregate validations to the parser validation from map/reduce functions 2015-09-04 13:30:40 -05:00
Cory LaNou e6de6d0887 change percentile to check errors in parsing, not in mapping 2015-09-04 13:30:40 -05:00
Cory LaNou 72fd115dc2 exposing tags on cursors, top/bottom are valid funcs now 2015-09-04 13:30:39 -05:00
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 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 1228c985ea Parser support for CREATE DATABASE IF NOT EXISTS 2015-08-28 19:04:50 -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 d0993c5e3f Unit-test detection of agggregate and raw queries 2015-08-11 12:25:06 -07: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
gunnaraasen eca76ed7a3 Parser fix, only allow ORDER BY clause with time ASC 2015-07-21 12:07:56 -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
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
Dejan Golja 000d6b8b0b added tests for SHOW GRANTS FOR statements 2015-06-17 01:24:09 +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
Cory LaNou aa450b7483 fix vet errors 2015-05-28 10:58:39 -06:00
David Norton 0a8be47ca1 fix #2644: make SHOW FIELD KEYS FROM /regex/ work 2015-05-27 10:26:32 -04:00
David Norton 8866c09e67 fix #2644: make SHOW SERIES FROM /<regex>/ work 2015-05-27 10:26:04 -04:00
David Norton cc8f5771fa fix #2644: make SHOW TAG VALUES FROM /regex/ work 2015-05-27 10:25:26 -04:00
Todd Persen 074b3bf099 Update the way that `DROP SERIES` handles `Sources` 2015-05-21 12:38:35 -07:00
Todd Persen 344db8ff1e Fix up parser and handle new error message. 2015-05-20 14:55:19 -07:00
Cory LaNou d6c7130721 more derivative tests 2015-05-19 16:25:23 -06:00
Cory LaNou 8d17c01b20 make select count(distinct(field)) work 2015-05-19 13:15:14 -06:00
Cory LaNou b71540e57b fix validateCountDistinct 2015-05-19 12:43:16 -06:00
Cory LaNou 7de477889b validate arguments for aggregate functions 2015-05-19 12:29:39 -06:00
Cory LaNou 28d53b644f first pass at count distinct 2015-05-19 12:29:39 -06:00
Cory LaNou b9de38e7d4 support SELECT DISTINCT foo and SELECT distinct(foo) 2015-05-19 09:16:20 -06:00
Cory LaNou db79464ae0 more refactoring 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 4c28c33332 validateDistinct should complain about aggregates before fields 2015-05-19 09:16:20 -06:00
Cory LaNou 66b7157fa4 add a test that has single quoted field name 2015-05-19 09:16:19 -06:00
Cory LaNou 3f9eacf24c add validations to parser for distinct 2015-05-19 09:16:19 -06:00
Cory LaNou b6b916edbc add distinct keyword 2015-05-19 09:16:19 -06:00
Todd Persen 1fa84c9387 Merge pull request #2579 from influxdb/aggregate-where-groupby-fix-2557
Fix false positive error for `aggregate functions with GROUP BY time …
2015-05-14 17:02:27 -07:00
Cory LaNou 098c65ad18 fix false positive error for `aggregate functions with GROUP BY time require a WHERE time clause` 2015-05-14 15:45:13 -06:00
Jason Wilder a0a4600e7f Add derivative function
Calculates the derivative of consequtive points and normalizes the
value to a given interval.  It supports simple derivates over
fields as well as nested derivatives over another aggregate function.

Fixes #1822
2015-05-13 15:35:42 -06:00
Jason Wilder eb1d7a659f Prohibit multiple columns in select when using derivative
May be supported in the future but workaround is to run separate
queries.
2015-05-13 15:35:42 -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 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
David Norton 86db3574ad fix #2286: parse error on CREATE CONTINUOUS QUERY 2015-04-17 16:40:29 -04:00