diff --git a/sqllogictest/src/parser.rs b/sqllogictest/src/parser.rs index 5d11a5b..ac2f5ab 100644 --- a/sqllogictest/src/parser.rs +++ b/sqllogictest/src/parser.rs @@ -93,8 +93,8 @@ pub enum QueryExpect { Error(ExpectedError), } -#[cfg(test)] impl QueryExpect { + /// Creates a new [`QueryExpect`] with empty results. fn empty_results() -> Self { Self::Results { types: Vec::new(), @@ -749,12 +749,7 @@ fn parse_inner(loc: &Location, script: &str) -> Result QueryExpect::Results { - types: Vec::new(), - sort_mode: None, - label: None, - results: Vec::new(), - }, + [] => QueryExpect::empty_results(), }; // The SQL for the query is found on second an subsequent lines of the record