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


##########
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:
   Should we also add this to the generic dialect? I could not grasp the idea 
of what expressions should be supported in the generic dialect and what should 
be not.
   
   For example, 
[`supports_select_expr_star`](https://github.com/apache/datafusion-sqlparser-rs/blob/4a307a937e071d5f315d347e931539af6ee644ad/src/dialect/mod.rs#L540-L542)
 isn't listed as supported. Neither is 
[`supports_select_exclude`](https://github.com/apache/datafusion-sqlparser-rs/blob/4a307a937e071d5f315d347e931539af6ee644ad/src/dialect/mod.rs#L595-L597).



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