diff --git a/influxql/parser.go b/influxql/parser.go index ba27c9a843..47f67fcc5e 100644 --- a/influxql/parser.go +++ b/influxql/parser.go @@ -159,6 +159,8 @@ func (p *Parser) parseDropStatement() (Statement, error) { tok, pos, lit := p.scanIgnoreWhitespace() if tok == SERIES { return p.parseDropSeriesStatement() + //} else if tok == MEASUREMENT { + //return p.parseDropMeasurementStatement() } else if tok == CONTINUOUS { return p.parseDropContinuousQueryStatement() } else if tok == DATABASE { @@ -173,6 +175,7 @@ func (p *Parser) parseDropStatement() (Statement, error) { } return nil, newParseError(tokstr(tok, lit), []string{"SERIES", "CONTINUOUS"}, pos) + //return nil, newParseError(tokstr(tok, lit), []string{"SERIES", "CONTINUOUS", "MEASUREMENT"}, pos) } // parseAlterStatement parses a string and returns an alter statement. diff --git a/influxql/parser_test.go b/influxql/parser_test.go index e9b064fb95..60cddc6f46 100644 --- a/influxql/parser_test.go +++ b/influxql/parser_test.go @@ -628,6 +628,7 @@ func TestParser_ParseStatement(t *testing.T) { {s: `DELETE`, err: `found EOF, expected FROM at line 1, char 8`}, {s: `DELETE FROM`, err: `found EOF, expected identifier at line 1, char 13`}, {s: `DELETE FROM myseries WHERE`, err: `found EOF, expected identifier, string, number, bool at line 1, char 28`}, + //{s: `DROP MEASUREMENT`, err: `found EOF, expected number at line 1, char 13`}, {s: `DROP SERIES`, err: `found EOF, expected number at line 1, char 13`}, {s: `DROP SERIES FROM`, err: `found EOF, expected identifier at line 1, char 18`}, {s: `DROP SERIES FROM src WHERE`, err: `found EOF, expected identifier, string, number, bool at line 1, char 28`},