yuval-illumex commented on code in PR #1604:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1604#discussion_r1894902880


##########
src/parser/mod.rs:
##########
@@ -11679,14 +11679,21 @@ impl<'a> Parser<'a> {
     pub fn parse_update(&mut self) -> Result<Statement, ParserError> {
         let or = self.parse_conflict_clause();
         let table = self.parse_table_and_joins()?;
+        let from_before_set = if self.parse_keyword(Keyword::FROM)
+            && dialect_of!(self is GenericDialect | PostgreSqlDialect | 
DuckDbDialect | BigQueryDialect | SnowflakeDialect | RedshiftSqlDialect | 
MsSqlDialect | SQLiteDialect )
+        {
+            Some(self.parse_table_and_joins()?)
+        } else {
+            None
+        };
         self.expect_keyword(Keyword::SET)?;
         let assignments = 
self.parse_comma_separated(Parser::parse_assignment)?;
         let from = if self.parse_keyword(Keyword::FROM)
             && dialect_of!(self is GenericDialect | PostgreSqlDialect | 
DuckDbDialect | BigQueryDialect | SnowflakeDialect | RedshiftSqlDialect | 
MsSqlDialect | SQLiteDialect )
         {
             Some(self.parse_table_and_joins()?)
         } else {
-            None
+            from_before_set

Review Comment:
   @iffyio My problem with your approach that it will break backwards 
compatibility, and I don't feel it "worth it" in this case. What do you think? 



-- 
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

Reply via email to