ryanschneider commented on code in PR #1927:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1927#discussion_r2199321302


##########
src/dialect/mod.rs:
##########
@@ -1076,6 +1088,15 @@ pub trait Dialect: Debug + Any {
     fn supports_comma_separated_drop_column_list(&self) -> bool {
         false
     }
+
+    /// Returns true if the dialect supports the passed in alias.
+    /// See [IsNotNullAlias].
+    fn supports_is_not_null_alias(&self, alias: IsNotNullAlias) -> bool {

Review Comment:
   I forgot to explain what I'm trying to work around: in `CREATE TABLE` 
statements the `NOT NULL` should never be considered an `Expr::IsNotNull` but 
it's getting parsed as such by the `parse_expr` calls in 
`parse_optional_column_option` on column definitions like `foo DEFAULT true NOT 
NULL` etc.
   
   So an alternative to the above special case would be to add a "mode" to 
`parse_expr` so it knows when it's parsing column definitions vs. other 
expressions, or maybe I could replace the calls to `parse_expr` in 
`parse_optional_column_option` with calls to 
`parse_subexpr(some_high_precedence)` where `some_high_precedence` is high 
enough to prevent it from considering the `NOT NULL`.



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