From e22c32ca27e179262c4f03cc742d6148b4204465 Mon Sep 17 00:00:00 2001 From: taytzehao Date: Sun, 8 Oct 2023 22:41:30 +0800 Subject: [PATCH] add comment --- src/sqlparser/src/parser.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sqlparser/src/parser.rs b/src/sqlparser/src/parser.rs index 4c0452e365eab..290c37e4c127d 100644 --- a/src/sqlparser/src/parser.rs +++ b/src/sqlparser/src/parser.rs @@ -3363,6 +3363,10 @@ impl Parser { loop { idents.push(self.parse_identifier()?); + // There are cases where no skip is required as minus could be used + // as a subtraction if an object has whitespace from the minus. If + // normal peek_token is used the subsequent minus could be mistaken + // to be part of the object rather than being a subtraction. match self.peek_token_no_skip() { Some(token_with_location) => match token_with_location.token { Token::Period => {