git-hulk commented on code in PR #1476:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1476#discussion_r1800538948


##########
src/parser/mod.rs:
##########
@@ -7156,6 +7156,26 @@ impl<'a> Parser<'a> {
                 partition,
                 with_name,
             }
+        } else if dialect_of!(self is ClickHouseDialect|GenericDialect)
+            && self.parse_keyword(Keyword::UPDATE)
+        {
+            let assignments = 
self.parse_comma_separated(Parser::parse_assignment)?;
+            let partition_id =
+                if self.parse_keyword(Keyword::IN) && 
self.parse_keyword(Keyword::PARTITION) {

Review Comment:
   ```suggestion
                   if self.parse_keywords(&[Keyword::IN, Keyword::PARTITION]) {
   ```



##########
tests/sqlparser_clickhouse.rs:
##########
@@ -1422,6 +1422,33 @@ fn parse_create_table_on_commit_and_as_query() {
     }
 }
 
+#[test]
+fn parse_update_data() {
+    let sql = "ALTER TABLE t UPDATE col1 = 1, col2 = col3 + col4 WHERE cod4 = 
1";

Review Comment:
   Could you please add some negative test cases?



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

Reply via email to