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


##########
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:
   Ok, I was able to make it work, but it required an ugly special case in 
`parse_subexpr`.  The good news is with this special case I didn't need to do 
any precedence changes for `NOT NULL`, just `NOTNULL`.
   
   If you have any suggestions on how to better handle this special case, 
please let me know!  The reason I need to handle it there is because 
`get_next_precedence()` doesn't know about the current `expr`, so one fix would 
be to pass `expr` to `get_next_precedence(expr)` then the precedence of `NOT 
NULL` could be dynamic if the current expr is an `Expr::Identifier` or 
`Value::Null`, then the logic could be moved back into `parse_infix`.
   
   Alternaitvely, I could move the special case into a helper function to 
compartmentalize the changes, but figured I'd get your feedback before going to 
far.  Thanks!



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