Commit Graph

181 Commits (5fa36639dbcd068ec72b147e6b661d9ba4fe3f63)

Author SHA1 Message Date
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
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
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
Cory LaNou 39d74e0486 fix fmt error 2015-04-08 09:26:23 -06: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
Philip O'Toole 1219ba7b93 Add simple WHERE time > absolute value test 2015-03-30 16:37:25 -07:00
Philip O'Toole 1b700264a7 Also include NEQ in filters
This fixes != for field value comparisons.
2015-03-27 23:07:57 -07:00
Philip O'Toole 272f7f760e Add unit tests, pass now. 2015-03-27 17:04:46 -07: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 dd6bb91463 fix test 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 fe44f63495 Fix parser unit test, statement is raw 2015-03-19 16:36:24 -07:00
Cory LaNou da171cfe32 make vet happy 2015-03-19 15:05:23 -06:00
Cory LaNou a6171b3382 refactor of limit/offset 2015-03-19 13:31:46 -06:00
David Norton 62ae32b0ce wire up regex in FROM clause 2015-03-16 19:40:59 -04:00
David Norton fd005a5f15 influxql: allow regex in FROM clause 2015-03-16 19:40:21 -04:00
Philip O'Toole e08066495a Add "SHOW STATS" command 2015-03-15 14:31:16 -07:00
Cory LaNou 08b15d9370 zeros are ok after all 2015-03-12 18:59:38 -06:00
Cory LaNou eda74a25f1 allow offset 0 2015-03-12 18:20:58 -06:00
Paul Dix 06e8c1b3e8 Add fill to select statements.
Fixes #1913
Add fill(none), fill(<num>), and fill(previous) options
2015-03-11 18:05:31 -07:00
Cory LaNou de1defc528 add SHOW SERVERS to query language 2015-03-10 13:46:05 -06:00
Paul Dix 1a545a1cc0 Update Slimit and Soffset to SLimit and SOffset 2015-03-09 20:09:47 -07:00
Paul Dix 8d2abc5c86 Add Slimit and Soffset. Update tests and behavior to use those. 2015-03-09 18:46:05 -07:00
Paul Dix eca4af5514 Wire ip limits, fix server_test, remove warns 2015-03-07 16:30:42 -08:00
Philip O'Toole a2e4556563 Allow 'INF' to indicate infinite retention 2015-03-05 15:23:54 -08:00
David Norton 9d6d36f2e9 fix #1799: change regex delim to '/' & RHS only 2015-03-03 09:32:15 -05:00
David Norton 08796bd6af fix #1799: make scanner recognize regex
Change the regex delimiter from single quotes to back ticks (`) and make
the scanner recognize regex tokens.

Single quotes are used for string literals. Using a unique delimiter for
regular expression literals allows the scanner to recognize regular
expression tokens, which is inline with the way the rest of the
scanner / parser work.
2015-03-03 09:32:15 -05:00
Joseph Rothrock 661482937f Support keys wrapped in dbl quotes
Issue: 1729

Trim off any leading or lagging dbl quotes.
2015-02-26 12:40:30 -08:00
Cory LaNou c34e28ba10 adding more test coverage for parsting create continuous query statements 2015-02-25 13:01:32 -07:00
Cory LaNou 60a08466c8 add drop measurement test for parser 2015-02-25 12:42:23 -07:00
Cory LaNou 151015b4b8 parsing DROP MEASUREMENT 2015-02-25 12:42:23 -07:00
Cory LaNou 2aa155c428 wip 2015-02-25 12:42:23 -07:00
Philip O'Toole 5f71aed8bd Fix previously failing GROUP BY * unit tests
GROUP BY * functionality is now in place.
2015-02-23 19:09:55 -08:00
Cory LaNou 27d7f45729 support drop series without from but with where 2015-02-21 17:05:08 -07:00
Cory LaNou 918c5c8ce9 one more err test condition for drop series 2015-02-21 17:05:08 -07:00
Cory LaNou fd9c19ad9c wire up drop series parsing 2015-02-21 17:05:08 -07:00
David Norton 9bff9cdeee issue #1431: wire up regex queries 2015-02-21 15:38:35 -05:00
David Norton 12bed3e74f issue #1430: add where regex to influxql 2015-02-21 15:37:52 -05:00
Paul Dix 5f14d5faf5 WIP: start implementation of continuous queries
* Update SelectStatement to have GroupByInterval
* Update parser to verify that CQs have GroupByInterval if Aggregated
* Implement CreateContinousQuery on Server
* Add ContinuousQueries to database
2015-02-17 21:00:24 -05:00
Mark Rushakoff 2e4b9d8b3b Add missing valid statements for SHOW
And alphabetize the order.
2015-02-09 17:06:18 -08:00
Philip O'Toole 54a1ac01b1 Test parsing of milliseconds 2015-02-05 14:51:36 -08:00
David Norton 2b84113487 issue #1423: wire up show field keys 2015-02-04 10:59:47 -05:00
David Norton 19992f3ecc gofmt -s (simplify) 2015-02-01 15:33:12 -05:00
David Norton 0cf681d19c influxql: remove TagKeyIdent, add WITH KEY clause 2015-01-29 15:01:25 -05:00
David Norton ae33bc99db issue #1411: wire up show tag keys 2015-01-28 21:33:19 -05:00
David Norton 2cf41d6ea9 influxql: fix WHERE TAG KEY parsing 2015-01-28 05:02:36 -05:00
David Norton 780831bb17 change LIST to SHOW 2015-01-25 22:56:20 -05:00
Paul Dix c524d9afe5 Fix parser tests 2015-01-25 17:51:51 -05:00
David Norton ab39d471a3 influxql: add OFFSET 2015-01-25 15:34:49 -05:00
Ben Johnson 73bc8215bc Remove combined string/ident scanning. 2015-01-19 16:01:24 -07:00
Ben Johnson 3c8c8724ed Implement full ident scanning, single quote strings. 2015-01-19 13:05:38 -07:00
Ben Johnson 81f457907f Add measurement normalization and identifier splitting. 2015-01-18 14:45:22 -07:00
David Norton 9e3ca7b569 influxql: add LIST USERS statement 2015-01-14 11:53:17 -05:00
David Norton 012b41e5ca influxql: add DROP RETENTION POLICY statement 2015-01-13 16:46:07 -05:00
David Norton d514cd03c8 influxql: add LIST RETENTION POLICIES statement 2015-01-13 15:40:43 -05:00
Philip O'Toole 0938f75fa5 Use pointer types to fix 'go vet' 2015-01-12 11:50:49 -08:00
Philip O'Toole 29122a5bab More 'go vet' fixes 2015-01-12 11:47:55 -08:00
Philip O'Toole c9fdf34b4f go vet: Fields{} -> []*Field{} 2015-01-12 11:43:38 -08:00
Philip O'Toole 295d63cb57 More vet fixes 2015-01-11 15:14:22 -08:00
David Norton ccab32f33e influxql: add WITH to CREATE USER & cleanup 2015-01-09 18:21:12 -05:00
David Norton 05e2bff6c4 influxql: add LIST DATABASES statement 2015-01-09 18:21:12 -05:00
David Norton 3b649d3e63 influxql: add CREATE CONTINUOUS QUERY (WIP) 2015-01-09 18:21:12 -05:00
David Norton f23417fa5a influxql: add CREATE CONTINUOUS QUERY, : separator 2015-01-09 18:21:12 -05:00
David Norton 4b5f9d3d0e influxql: fix broken test in parser_test.go 2015-01-06 13:47:21 -05:00
David Norton d6aa34e840 influxql: add ALTER RETENTION POLICY statement 2015-01-05 13:24:50 -05:00
David Norton 7443e1323a influxql: add DROP USER statement 2015-01-04 22:56:25 -05:00
David Norton e62efba6ed influxql: add DROP DATABASE statement 2015-01-04 22:32:49 -05:00
David Norton 52c0bf0fa2 influxql: refactor ParseStatement 2015-01-04 22:03:18 -05:00