Jonathan A. Sternberg
e0ac29dd2d
Implement most of top() and bottom()
...
This does not implement the time selector, but everything else is
implemented. Unfortunately, there are no tests for bottom() in the old
query engine, so only top() is properly tested.
2016-02-10 09:40:25 -07:00
Ben Johnson
00806de9b8
refactor query engine
2016-02-10 09:40:25 -07:00
Ben Johnson
0ad9c31169
simple derivative
2016-02-10 09:40:24 -07:00
Ben Johnson
57336bd6ee
fix conditionals
2016-02-10 09:40:24 -07:00
Ben Johnson
60b051ee88
LIMIT/OFFSET
2016-02-10 09:40:24 -07:00
Ben Johnson
036382ee20
SLIMIT/SOFFSET
2016-02-10 09:40:24 -07:00
Ben Johnson
cde973f409
refactor query engine
2016-02-10 09:40:24 -07:00
Michael Mattioli
e2a24c26fd
Renamed InfluxQL markdown file
...
Renamed markdown file explaining InfluxQL
both for uniformity as well as for easy
access from github.com
2016-02-03 21:30:14 -05:00
David Norton
58e0eed9cb
Merge pull request #5403 from influxdata/meta-service2
...
refactor meta into separate meta client & service
2016-01-22 20:06:51 -05:00
Jonathan A. Sternberg
1429f4b4ea
Teach the CQ runner how to deal with a resample interval higher than the query interval
...
Previously if you issued a CQ with a resample interval higher than the
query interval, such as the following:
CREATE CONTINUOUS QUERY cq ON db
RESAMPLE EVERY 4m
BEGIN
SELECT mean(value) INTO cpu_mean FROM cpu GROUP BY time(2m)
END
This would result in strange behavior because the FOR value defaulted to
the GROUP BY interval and the minimum time passing before a CQ ran was
also the resample interval, so it wouldn't run the appropriate intervals
even if you set the resample duration to a higher value.
This tweaks the CQ runner to set the minimum interval before a bucket
becomes capable of running to the lower of the query interval or the
resample interval instead of always using the resample interval.
It also sets the default resample duration to be the higher value of the
query interval or the resample interval so the above query gets a
default of 4m instead of 2m and will execute 2 queries every 4 minutes.
If you manually set the resample duration to a lower value than the
resample interval, the old behavior will still happen and should be
considered an error.
This also makes trying to create a continuous query with a resample
duration of below the resample interval or query interval (whichever is
higher) as an error returned by the parser.
Fixes #5286 .
2016-01-22 09:43:46 -05:00
Paul Dix
88cf27e63b
Remove debugging print lines.
2016-01-21 15:28:33 -05:00
Paul Dix
f385945058
Update Server to work with new metaservice/client
2016-01-21 15:28:33 -05:00
Paul Dix
c9d82ad0ad
Wire up meta service functionality
...
* Add dir, hostname, and bind address to top level config since it applies to services other than meta
* Add enabled flags to example toml for data and meta services
* Wire up add/remove raft peers and meta servers to meta service
* Update DROP SERVER to be either DROP META SERVER or DROP DATA SERVER
* Bring over statement executor from old meta package
* Start meta service client implementation
* Update meta service test to use the client
* Wire up node ID/meta server storage information
2016-01-21 15:28:32 -05:00
Paulo Pires
17c2a344cd
Fixed database creation with retention statement parsing. Fixes #5077
2016-01-07 22:08:19 +00:00
Mark Rushakoff
6022775c55
Merge pull request #5172 from influxdata/quoteident-alias
...
Add missing QuoteIdent
2016-01-06 17:00:34 -08:00
Jonathan A. Sternberg
5d4ecf853c
Add continuous query option for customizing resampling
...
This makes the following syntax possible:
CREATE CONTINUOUS QUERY mycq ON mydb
RESAMPLE EVERY 1m FOR 1h
BEGIN
SELECT mean(value) INTO cpu_mean FROM cpu GROUP BY time(5m)
END
The RESAMPLE option customizes how often an interval will be sampled and
the duration. The interval is customized with EVERY. Any intervals
within the resampling duration on a multiple of the resample interval
will be updated with the new results from the query.
The duration is customized with FOR. This determines how long an
interval will participate in resampling.
Both options are optional. If RESAMPLE is in the syntax, at least one of
the two needs to be given. The default for both is the interval of the
continuous query.
The service also improves tracking of the last run time and the logic of
when a query for an interval should be run. When determining the oldest
interval to run for a query, the continuous query service determines
what would have been the optimal time to perform the next query based on
the last run time. It then uses this time to determine the oldest
interval that should be run using the resample duration and will
resample all intervals between this time and the current time as opposed
to potentially forgetting about the last run in an interval if the
continuous query service gets delayed for some reason.
This removes the previous config options for customizing continuous
queries since they are no longer relevant and adds a new option of
customizing the run interval. The run interval determines how often the
continuous query service polls for when it should execute a query. This
option defaults to 1s, but can be set to 1m if the least common factor
of all continuous queries' intervals is a higher value (like 1m).
2015-12-28 16:43:49 -05:00
Paulo Pires
be577e5a23
SHOW FIELD shouldn't expect VALUES. Fixes #5176
2015-12-20 09:52:09 +00:00
Mark Rushakoff
90f0a74349
Add missing QuoteIdent
2015-12-19 16:23:51 -08:00
Nathaniel Cook
804ddaa2df
fix #4773 use explict derivative function names not just suffix
2015-12-15 09:21:25 -07:00
mengjingleli
3a901abbd8
fix issue #5054
2015-12-09 15:27:33 +08:00
Nathaniel Cook
7ffbbc1072
make fill previous for count() queries work
2015-12-07 12:51:40 -07:00
Philip O'Toole
317e6dde8c
Fix string version of CREATE DATABASE ... WITH
...
Whitespace needed around keywords.
2015-12-06 09:35:31 -08:00
Nathaniel Cook
3227951069
Stub out DELETE in parser to return better error
2015-12-04 14:47:44 -07:00
Philip O'Toole
5c63ccaa6f
Revert "Merge pull request #4988 from influxdb/revert-4984-fix-query-panic"
...
This reverts commit 44ff2f87db
, reversing
changes made to 6fa016447f
.
2015-12-04 11:05:02 -08:00
Mark Rushakoff
d2f8a10f96
Merge pull request #4891 from influxdb/duration-must-have-units
...
InfluxQL: FormatDuration uses "u" for microsecond units
2015-12-04 08:05:21 -08:00
Philip O'Toole
3264b853cc
Revert "fix raw math query panic"
2015-12-04 06:19:06 -08:00
Philip O'Toole
6fa016447f
Merge pull request #4984 from mengjinglei/fix-query-panic
...
fix raw math query panic
2015-12-04 06:17:19 -08:00
Philip O'Toole
c76b109ef4
Merge pull request #4858 from viru/fix-nested-aggr
...
Validate nested aggregations in queries
2015-12-04 05:58:29 -08:00
mengjingleli
2602dd241f
fix raw math query panic
2015-12-04 15:17:31 +08:00
Mark Rushakoff
da8c56049b
FormatDuration uses "u" for microsecond units
...
Previously, it was formatting microsecond durations without any units.
Currently, all durations must have units explicitly specified.
2015-12-02 09:00:58 -08:00
Paulo Pires
30cc1339ec
Renamed RetentionPolicyExists to RetentionPolicyCreate.
2015-11-28 16:15:00 +00:00
Paulo Pires
8e2868ed60
Added support for setting retention policy on database creation.
...
Fixes #2676
2015-11-27 20:02:55 +00:00
Mark Rushakoff
ed393398cd
Merge pull request #4868 from influxdb/influxql-doc-updates
...
Influxql doc updates
2015-11-24 12:16:12 -08:00
Mark Rushakoff
81beb43b69
Add more missing QuoteIdent calls
2015-11-23 14:51:57 -08:00
Mark Rushakoff
c7782878aa
Fix strings for SHOW MEASUREMENTS
2015-11-23 14:51:57 -08:00
Mark Rushakoff
fc628fdb42
Fix strings for CREATE/DROP SUBSCRIPTION
2015-11-23 14:51:57 -08:00
Mark Rushakoff
f4e19094ec
Fix String() implementations of various Statements
2015-11-23 14:51:57 -08:00
Mark Rushakoff
74626d9511
Fix typo in parse error
2015-11-23 14:51:57 -08:00
Mark Rushakoff
c24a849d9d
SHOW SERIES does not accept group_by
...
[ci skip]
2015-11-22 13:40:35 -08:00
Mark Rushakoff
8ca1f5e0fb
Add missing SHOW GRANTS; fix DELETE FROM
...
[ci skip]
2015-11-22 13:14:19 -08:00
Mark Rushakoff
03889cc991
Fix EBNF for drop series, show measurements
...
[ci skip]
2015-11-22 12:05:20 -08:00
Mark Rushakoff
73ef6ba858
More doc updates
...
[ci skip]
2015-11-22 10:21:45 -08:00
Mark Rushakoff
b51dafbfaf
Prefer on_clause over `"ON" db_name`
...
[ci skip]
2015-11-22 10:14:49 -08:00
Mark Rushakoff
fb449b26c0
Miscellaneous InfluxQL documentation fixes
2015-11-21 17:13:53 -08:00
Paweł Kowalak
c4d7261462
Validate nested aggregations in queries
...
For DERIVATIVE aggregations there was only one check performed: if
aggregation function is given when using group by. However the nested
aggregation function syntax was not checked.
Fixes #4123
2015-11-20 21:15:24 +01:00
Mateusz Dymiński
8090ba6830
SHOW SHARD GROUPS
2015-11-14 22:27:24 +01:00
ch33hau
2235dcec6b
Added IF EXISTS for DROP DATABASE command, #4659
2015-11-07 10:57:49 +08:00
ch33hau
aeb48501d1
Updated keyword list in INFLUXQL.md
2015-10-27 00:31:38 +08:00
David Norton
a3d127f797
Revert "add RENAME DATABASE"
...
This reverts commit 7212bfce83
.
Conflicts:
influxql/parser.go
influxql/token.go
meta/internal/meta.pb.go
meta/internal/meta.proto
2015-10-20 09:01:34 -04:00
David Norton
20929c3db2
Revert "change syntax to ALTER DATABASE ... RENAME TO ..."
...
This reverts commit 668b5b9bfb
.
2015-10-20 08:43:45 -04:00
David Norton
34c9a053dd
Revert "improvements from code review"
...
This reverts commit 37964a032f
.
Conflicts:
meta/internal/meta.proto
2015-10-20 08:41:50 -04:00
David Norton
a1b0f53108
feat #3523 : parse WITH in SHOW MEASUREMENTS
2015-10-19 14:00:53 -04:00
Nathaniel Cook
cb1aaa8e42
Merge pull request #4375 from influxdb/subscriptions
...
Feature add subscriber service for creating/dropping subscriptions
2015-10-15 09:17:26 -06:00
Nathaniel Cook
8b31007aa7
Adds subscriber service for creating/dropping subscriptions to the
...
InfluxDB data stream.
2015-10-14 15:23:45 -06:00
Sean Beckett
8f79ce89aa
Update INFLUXQL.md
2015-10-13 16:54:48 -07:00
Konstantin Shaposhnikov
d887e798c3
Fix infinite recursion in DeleteStatement.String()
...
Fixes #4406
2015-10-12 21:38:50 +08:00
David Norton
512d6ac050
fix #4280 : only drop points matching WHERE clause
2015-10-09 18:34:32 -04:00
linearb
37964a032f
improvements from code review
2015-10-09 13:57:02 -04:00
linearb
668b5b9bfb
change syntax to ALTER DATABASE ... RENAME TO ...
2015-10-09 13:56:23 -04:00
linearb
7212bfce83
add RENAME DATABASE
2015-10-09 13:55:38 -04:00
Nick Dawbarn
136dbef0e7
Formatting fixes
2015-10-08 19:41:36 +10:00
Nick Dawbarn
26f6d00668
Bugfix for #3429 String representations of RegexLiterals generated in influxql/ast.go add the / char as a start and end delimiter, but does not escape any / characters that may exist with the regex
2015-10-08 19:41:36 +10:00
Konstantin Shaposhnikov
95a0e149b0
Fix aggregates validation in presence of arithmetic expressions
...
Fixes #4325
2015-10-06 21:24:50 +08:00
David Norton
4375545064
fix #4276 : walk DropSeriesStatement
2015-10-05 19:56:30 -04:00
Philip O'Toole
2ac0357406
Support dropping non-Raft nodes
2015-10-04 00:19:52 -07:00
Philip O'Toole
d74e0690c7
Revert "Merge pull request #4233 from influxdb/drop-server"
...
This reverts commit 0bdb36f6dc
, reversing
changes made to 3085fbc138
.
2015-10-02 08:39:57 -07:00
Cory LaNou
d036f63771
additional parser test for DROP SERVER
2015-10-01 15:39:15 -05:00
Cory LaNou
dc317ce85f
optional end requirments should also allow SEMICOLON
2015-10-01 15:39:15 -05:00
Cory LaNou
93507c0b51
add force for drop server, misc fixes, more wip
2015-10-01 15:39:15 -05:00
Cory LaNou
205c7674f6
add drop server tests
2015-10-01 15:39:14 -05:00
Cory LaNou
3c74c13908
add drop server statement
2015-10-01 15:39:14 -05:00
Jason Wilder
6dcd8d71a1
Merge pull request #4149 from peekeri/derivative_fix
...
influxql: when using derivative, check 'group by time' instead of 'where time ...'
2015-09-30 16:44:54 -06:00
Philip O'Toole
8177b80929
Update, and ease maintainabilty of SHOW errors
...
Fixes issue #4164 .
2015-09-24 13:01:31 -07:00
Cory LaNou
82c50bb746
Merge pull request #4202 from influxdb/issue-1577-rb
...
Allow fields to be selected with "selector" aggregate functions
2015-09-23 16:33:20 -05:00
Cory LaNou
ab84d3eb00
break early when detecting only selector statements
2015-09-23 15:27:43 -05:00
Cory LaNou
6b19e3dd9c
minor refactorings
2015-09-23 09:47:24 -05:00
Cory LaNou
78bc740434
full support for min/max/first/last
2015-09-23 09:03:57 -05:00
Philip O'Toole
683cc0f226
Fix string representation of SHOW STATS
2015-09-22 21:57:20 -07:00
Philip O'Toole
a71a5ffd36
Support module-selection for SHOW DIAGNOSTICS
2015-09-22 21:56:46 -07:00
Philip O'Toole
35d09cedfd
Support SHOW STATS for specific module
2015-09-22 16:36:13 -07:00
Ben Johnson
8e27cf1fd8
Merge remote-tracking branch 'upstream/master' into refactor-select-mapper
...
Conflicts:
tsdb/store.go
2015-09-22 13:58:24 -06:00
Ben Johnson
b213ddad78
refactor cursor
2015-09-22 13:10:12 -06:00
Ben Johnson
1b8b625787
refactor SelectMapper
2015-09-22 13:09:26 -06:00
David Norton
e4800df006
add more parser tests
2015-09-22 14:25:13 -04:00
David Norton
e176d2c0dd
make SHOW TAG KEYS support (S)LIMIT & (S)OFFSET
2015-09-21 13:05:53 -04:00
Jari Sukanen
c844ec10d5
influxql: when using derivative, check 'group by time' instead of 'where time ...'
...
When using derivative, it is required that aggregate function is used as
sub-call when grouping by time is used. However, AST parsing used to check
if WHERE-clause contained condition with 'time'.
Fix this by changing check to see if groupByInterval is present.
Modify also related error case tests and add check for
select derivative(...) ... where time > ...
2015-09-18 08:55:09 +03:00
Cory LaNou
ba830be3b9
actually move influxql.Row* -> models.Row*
2015-09-16 16:32:50 -05:00
Cory LaNou
5395ac7634
Period in field name that matches measurement fails. Fixes #3457
2015-09-15 16:26:39 -05:00
Cory LaNou
6ffd38f02b
Merge pull request #4084 from influxdb/issue-3718
...
Derivative query with group by time but no aggregate function validation
2015-09-11 14:25:14 -05:00
Cory LaNou
91d833efeb
Derivative query with group by time but no aggregate function should fail parse. Fixes #3718
2015-09-11 14:16:29 -05:00
Daniel Morsing
66fc270d1e
Move aggregate funcs into tsdb
...
Pure move, No functional changes.
2015-09-11 14:27:47 +00:00
Cory LaNou
7f2ba8155a
removing unecessary continues
2015-09-10 13:10:21 -05:00
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
a09e2c27bb
minor tweaks based on PR review
2015-09-04 13:41:46 -05:00
Cory LaNou
fa4415b3a4
refactor processing top/bottom results. clarify some comments
2015-09-04 13:30:43 -05:00
Cory LaNou
bdc54cf5d2
helpers -> pkg + readme
2015-09-04 13:30:43 -05:00
Cory LaNou
6a3bedc0e1
add additional parser test for top function with tags
2015-09-04 13:30:42 -05:00
Cory LaNou
9ab3d89c06
bucketTime* -> tMin*
2015-09-04 13:30:42 -05:00
Cory LaNou
4a9e936858
minor comment fix
2015-09-04 13:30:42 -05:00
Cory LaNou
3ca93594c3
BucketTime -> TMin
2015-09-04 13:30:42 -05:00
Cory LaNou
b71833ab46
refactor allowMixedAggregates, comment cleanup
2015-09-04 13:30:42 -05:00
Cory LaNou
88ce04a4b9
move comment to proper line
2015-09-04 13:30:42 -05:00
Cory LaNou
9703467171
refactor validateAggregates
2015-09-04 13:30:41 -05:00
Cory LaNou
3db5a85139
all tests passing for top
2015-09-04 13:30:41 -05:00
Cory LaNou
347ffc70b4
wire up advanced top sorting/slicing
2015-09-04 13:30:41 -05:00
Cory LaNou
8c4595b345
top is coming together. filling out fields properly
2015-09-04 13:30:41 -05:00
Cory LaNou
ba79007960
wip
2015-09-04 13:30:41 -05:00
Cory LaNou
6f7eca9778
correcting sort behavior for top
2015-09-04 13:30:40 -05:00
Cory LaNou
046282249a
wip remapping top output
2015-09-04 13:30:40 -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
c5358dcd2a
always sort results for ReduceTop. Skip test until we verify expected behavior
2015-09-04 13:30:40 -05:00
Cory LaNou
b45872c1ac
first pass at ReduceTop
2015-09-04 13:30:40 -05:00
Cory LaNou
6b005af731
change ReducePercentile signature
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
f8d486f99c
maptop bool test
2015-09-04 13:30:40 -05:00
Cory LaNou
52cb46fc56
mixed maptop test with strings
2015-09-04 13:30:40 -05:00
Cory LaNou
dd278a10f6
add test for mixed numerics and fix infer
2015-09-04 13:30:39 -05:00
Cory LaNou
193fd501db
first pass at MapTop. more testing to come
2015-09-04 13:30:39 -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
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
Henrik Johansson
3353e16b59
Code style fix after review of #2956
2015-06-26 08:56:22 +02:00
Henrik Johansson
0c59240e80
Review fixes for #2956
2015-06-25 14:43:22 -06:00
Henrik Johansson
8bb2fc52a9
Reverted the addition of extra function to the ast for #2956 .
...
Accidentally added due to ignorance really.
2015-06-25 14:43:22 -06:00
Henrik Johansson
41218f1a66
Fixed #2956
2015-06-25 14:42:53 -06:00
Henrik Johansson
2802047e68
Added failing test for #2956
2015-06-25 14:42:53 -06:00
Dejan Golja
000d6b8b0b
added tests for SHOW GRANTS FOR statements
2015-06-17 01:24:09 +10:00
Dejan Golja
f133ceb350
Added support for SHOW GRANTS FOR USER syntax
2015-06-17 01:00:26 +10:00
林芳荣
63174e0dbf
merge
2015-06-12 23:43:18 +08:00
Philip O'Toole
be5491ea77
Merge pull request #2918 from pradeepchhetri/master
...
Fixed some typos
2015-06-11 18:28:24 -07:00
Jason Wilder
ad02244863
Fix field type conflict error
...
Fixes #2908
2015-06-11 11:02:10 -06:00
Pradeep Chhetri
37750acef6
Fixed some Typos
2015-06-11 17:33:26 +05:45
linfangrong
a2c31264e4
Update functions.go
2015-06-11 19:45:05 +08: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
a2488ab8a5
Merge pull request #2804 from nvcook42/master
...
Time literals should use single quotes in String representation
2015-06-10 21:09:21 -07:00
David Norton
ef8372766f
hard code DataType values
2015-06-10 16:09:23 -04:00
David Norton
29777f2a8e
change influxql DataType from string to int
2015-06-10 16:02:26 -04:00
Todd Persen
258ae9c9ca
Merge pull request #2859 from influxdb/fix-2845
...
fix #2845 : fix panic on aggregate functions
2015-06-09 22:42:36 -07:00
Philip O'Toole
7ff2fdfcb4
Initialize influxql test data
2015-06-09 22:38:11 -07:00
David Norton
843ef41cc9
fix #2845 : fix panic on aggregate functions
2015-06-09 18:29:54 -04:00
Cory LaNou
709a7ffd06
add where clause integration tests, add support for int64 comparisons
2015-06-09 15:45:00 -05:00
Nathaniel Cook
4d1d9c5015
update tests for single quotes
2015-06-06 15:03:06 -06:00
Nathaniel Cook
bf666b7f15
time literals should use single quotes
2015-06-06 14:57:37 -06:00
Ben Johnson
b925e1c1af
Multi-node clustering.
...
This commit adds the ability to cluster multiple nodes together to share
the same metadata through raft consensus.
2015-06-05 14:41:19 -06:00
Ben Johnson
44d38cb430
Merge branch 'master' into alpha1
2015-06-02 10:40:52 -06: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
8c8a55a737
Removed 'failed' from test suite.
2015-05-30 08:59:27 -06:00
Ben Johnson
6677ea074f
more services, more test fixes, getting closer...
2015-05-29 14:59:57 -06:00
Ben Johnson
1f294ce8de
Add httpd.Handler.serveQuery() tests.
2015-05-29 14:59:57 -06:00
Paul Dix
072dacc1ab
Update tx.go to work with tsdb
2015-05-29 14:59:57 -06:00
Ben Johnson
75ab63b538
Refactor meta statement execution to meta.StatementExecutor.
2015-05-29 14:54:04 -06:00
Cory LaNou
aa450b7483
fix vet errors
2015-05-28 10:58:39 -06:00
gunnaraasen
a849d16826
Add int_lit as unary expression
2015-05-27 09:35:29 -07:00
gunnaraasen
5ae912a2c1
Disallow 0 at the start of an integer
2015-05-27 09:30:22 -07:00
gunnaraasen
751e09f388
Changed definition of ascii_letter and decimal_digit to letter and digit
2015-05-27 09:30:09 -07:00
gunnaraasen
0844149b7a
Clean up literal definitions, especially for integers and floats
2015-05-27 09:29:54 -07:00
gunnaraasen
720f3bdc50
Removed db_name section and updated the identifier section
2015-05-27 09:29:41 -07: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
David Norton
fe99177fb3
fix #2644 : make SHOW TAG KEYS FROM /<regex>/ work
2015-05-27 10:22:22 -04:00
Todd Persen
99cb11de49
Merge pull request #1997 from influxdb/fix-1997-include-tags-in-select-wildcard
...
Update SELECT * to return tag values
2015-05-25 23:35:14 -07:00
David Norton
e4670cb934
fix #2635 : Fix query against bool field in WHERE
2015-05-24 05:00:59 -04:00
Todd Persen
ae6d82c8de
Fix AST test for `SELECT *` rewrite.
2015-05-22 13:56:11 -07:00
Todd Persen
fec08fc858
Include tags when doing a `SELECT *`.
2015-05-22 13:38:28 -07:00
Todd Persen
37c47e36d5
Merge pull request #2624 from influxdb/fix-2563-remove-drop-series-id
...
Remove references to SeriesID in `DROP SERIES` handlers.
2015-05-21 13:14:29 -07:00
Todd Persen
074b3bf099
Update the way that `DROP SERIES` handles `Sources`
2015-05-21 12:38:35 -07:00
Todd Persen
7828af48fd
Make `DROP SERIES` take `Sources` instead of `Source`
2015-05-21 11:18:21 -07:00
Todd Persen
344db8ff1e
Fix up parser and handle new error message.
2015-05-20 14:55:19 -07:00
Todd Persen
e7c40e5cae
Remove references to SeriesID in `DROP SERIES` handlers.
2015-05-20 14:27:33 -07:00
Cory LaNou
f21f72189b
fmt
2015-05-20 14:15:33 -06:00
Todd Persen
9c8f42f133
Minor beautification.
2015-05-20 12:02:49 -07:00
Todd Persen
a88380b465
Allow tags to be selected in queries.
2015-05-20 11:35:41 -07:00
Todd Persen
ef178dd4d3
Fix typos in comments.
2015-05-20 11:06:20 -07:00
Cory LaNou
d6c7130721
more derivative tests
2015-05-19 16:25:23 -06:00
Cory LaNou
37e677a639
better validation for arguments for [non]derivative
2015-05-19 16:17:36 -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
ca11be338f
add MapCountDistinct/ReduceCountDistinct function tests
2015-05-19 12:29:39 -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
fc7d63ce61
validate methods can be private
2015-05-19 09:16:21 -06:00
Cory LaNou
4e5c72ef69
refactor RewriteDistinct (thx @dgnorton)
2015-05-19 09:16:21 -06:00
Cory LaNou
2b7701678c
remove cruft
2015-05-19 09:16:21 -06:00
Cory LaNou
580def2ff6
only rewrite if we have distinct
2015-05-19 09:16:20 -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
97aa735bf1
fix comment type
2015-05-19 09:16:20 -06:00
Levi Cook
e8b0484859
MapDistinct return nil on empty input and TestReduceDistinct
2015-05-19 09:16:20 -06:00
Levi Cook
8d4c36c9f6
MapDistinct and distinctValues sort tests
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
Levi Cook
41775a54eb
map distinct and reduce cleanup
2015-05-19 09:16:20 -06:00
Levi Cook
514dd51bc6
refactor distinctValues sorting
2015-05-19 09:16:19 -06:00
Cory LaNou
81c9c9d681
use a concrete type for distinct results from mapper
2015-05-19 09:16:19 -06:00
Cory LaNou
adc0e55a15
assing -> assign
2015-05-19 09:16:19 -06:00
Cory LaNou
031596a894
support bool sort for distinct results
2015-05-19 09:16:19 -06:00
Cory LaNou
66b7157fa4
add a test that has single quoted field name
2015-05-19 09:16:19 -06:00
Cory LaNou
69ff1d2c61
allow for a quoted field name in distinct
2015-05-19 09:16:19 -06:00