cristhiank commented on code in PR #2283:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2283#discussion_r3096822610


##########
src/parser/mod.rs:
##########
@@ -8435,6 +8435,17 @@ impl<'a> Parser<'a> {
             None
         };
 
+        // ClickHouse allows PARTITION BY after ORDER BY
+        // 
https://clickhouse.com/docs/en/sql-reference/statements/create/table#partition-by
+        let partition_by = if create_table_config.partition_by.is_none()
+            && dialect_of!(self is ClickHouseDialect | GenericDialect)

Review Comment:
   Thanks for the review, addressed in the latest changes.



##########
src/parser/mod.rs:
##########
@@ -15331,6 +15342,33 @@ impl<'a> Parser<'a> {
                         constraint: self.parse_join_constraint(false)?,
                     },
                 }
+            } else if dialect_of!(self is ClickHouseDialect | GenericDialect)

Review Comment:
   Thanks for the review, addressed in the latest changes.



##########
src/parser/mod.rs:
##########
@@ -15331,6 +15342,33 @@ impl<'a> Parser<'a> {
                         constraint: self.parse_join_constraint(false)?,
                     },
                 }
+            } else if dialect_of!(self is ClickHouseDialect | GenericDialect)
+                && self.parse_keywords(&[Keyword::INNER, Keyword::ARRAY, 
Keyword::JOIN])
+            {
+                // ClickHouse: INNER ARRAY JOIN
+                Join {
+                    relation: self.parse_table_factor()?,
+                    global,
+                    join_operator: JoinOperator::InnerArrayJoin,
+                }
+            } else if dialect_of!(self is ClickHouseDialect | GenericDialect)

Review Comment:
   Thanks for the review, addressed in the latest changes.



##########
src/parser/mod.rs:
##########
@@ -15331,6 +15342,33 @@ impl<'a> Parser<'a> {
                         constraint: self.parse_join_constraint(false)?,
                     },
                 }
+            } else if dialect_of!(self is ClickHouseDialect | GenericDialect)
+                && self.parse_keywords(&[Keyword::INNER, Keyword::ARRAY, 
Keyword::JOIN])
+            {
+                // ClickHouse: INNER ARRAY JOIN
+                Join {
+                    relation: self.parse_table_factor()?,
+                    global,
+                    join_operator: JoinOperator::InnerArrayJoin,
+                }
+            } else if dialect_of!(self is ClickHouseDialect | GenericDialect)
+                && self.parse_keywords(&[Keyword::LEFT, Keyword::ARRAY, 
Keyword::JOIN])
+            {
+                // ClickHouse: LEFT ARRAY JOIN
+                Join {
+                    relation: self.parse_table_factor()?,
+                    global,
+                    join_operator: JoinOperator::LeftArrayJoin,
+                }
+            } else if dialect_of!(self is ClickHouseDialect | GenericDialect)

Review Comment:
   Thanks for the review, addressed in the latest changes.



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