test: add basic cases for distributed TQL (#1437)

* test: add basic cases for distributed TQL

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* drop table

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
Ruihang Xia
2023-04-23 11:34:42 +08:00
committed by GitHub
parent c75845c570
commit 5d77ed00bb
3 changed files with 46 additions and 1 deletions

View File

@@ -114,7 +114,8 @@ impl<'a> ParserContext<'a> {
// TODO(dennis): supports multi TQL statements separated by ';'?
}
Ok(query.trim().to_string())
// remove the last ';' or tailing space if exists
Ok(query.trim().trim_end_matches(';').to_string())
} else {
Err(ParserError::ParserError(format!("{delimiter} not found",)))
}