PokIsemaine commented on code in PR #1724:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/1724#discussion_r1962907240
##########
src/parser/mod.rs:
##########
@@ -9191,17 +9191,31 @@ impl<'a> Parser<'a> {
pub fn parse_optional_order_by(&mut self) -> Result<Option<OrderBy>,
ParserError> {
if self.parse_keywords(&[Keyword::ORDER, Keyword::BY]) {
- let order_by_exprs =
self.parse_comma_separated(Parser::parse_order_by_expr)?;
- let interpolate = if dialect_of!(self is ClickHouseDialect |
GenericDialect) {
- self.parse_interpolations()?
+ let order_by = if self.parse_keyword(Keyword::ALL) {
+ if !self.dialect.supports_order_by_all() {
+ return parser_err!(
+ "ALL is not supported in ORDER BY",
+ self.peek_token().span.start
+ );
+ }
Review Comment:
If an unsupported dialect uses `ORDER BY ALL`, should we return `parser_err`
or an `OrderByKind::Expressions` type `OrderBy` with its expr as `ALL`?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]