zyuiop commented on code in PR #22999:
URL: https://github.com/apache/datafusion/pull/22999#discussion_r3434709413
##########
datafusion/sql/src/unparser/expr.rs:
##########
@@ -156,10 +156,24 @@ impl Unparser<'_> {
let l = self.expr_to_sql_inner(left.as_ref())?;
let r = self.expr_to_sql_inner(right.as_ref())?;
- Ok(ast::Expr::Nested(Box::new(ast::Expr::IsDistinctFrom(
- Box::new(l),
- Box::new(r),
- ))))
+ match self.dialect.distinct_from_style() {
+ DistinctFromStyle::FullText =>
Ok(ast::Expr::Nested(Box::new(
+ ast::Expr::IsDistinctFrom(Box::new(l), Box::new(r)),
+ ))),
+ DistinctFromStyle::DiamondOperators => {
+ Ok(ast::Expr::Nested(Box::new(ast::Expr::UnaryOp {
Review Comment:
Yes, I can move the `Expr::Nested` inside Unary. Or do you think we also
need an `Expr::Nested` outside the unary operator?
--
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]