pull/1698/head
Cory LaNou 2015-02-23 13:07:16 -07:00
parent 241a514fbb
commit 2aa155c428
2 changed files with 4 additions and 0 deletions

View File

@ -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.

View File

@ -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`},