logan-keede commented on code in PR #15680: URL: https://github.com/apache/datafusion/pull/15680#discussion_r2045629257
########## datafusion/sql/src/parser.rs: ########## @@ -561,17 +577,13 @@ impl<'a> DFParser<'a> { if token == Token::EOF || token == Token::SemiColon { break; } else { - return Err(ParserError::ParserError(format!( - "Unexpected token {token}" - ))); + return parser_err!(format!("Unexpected token {token}"))?; Review Comment: we can probably use `expected` function here. I will try to commit that and other suggestions tomorrow. (It's quite late here) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org