pravic commented on code in PR #2024:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2024#discussion_r2349843369


##########
src/dialect/mod.rs:
##########
@@ -596,6 +596,20 @@ pub trait Dialect: Debug + Any {
         false
     }
 
+    /// Returns true if the dialect supports Common Scalar Expressions in 
`SELECT`.
+    ///
+    /// For example:
+    /// ```sql
+    /// WITH
+    ///   toDate('2000-01-01') AS start_date
+    /// SELECT * from tbl WHERE col1 > start_date;
+    /// ```
+    ///
+    /// 
[ClickHouse](https://clickhouse.com/docs/sql-reference/statements/select/with#common-scalar-expressions)
+    fn supports_common_scalar_expressions(&self) -> bool {
+        false
+    }

Review Comment:
   I think, CSE exist only in ClickHouse. Does it make sense to include this to 
the generic dialect? If yes, then:
   
   > as long as the syntax doesn't conflict with existing syntax support on the 
dialect
   
   It's difficult for me to answer to this question - I don't know whether 
there can be a conflict. But since it's only a ClickHouse feature - I'd not 
include this to the generic dialect. But I won't oppose either.
   



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