You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/08/27 11:53:06 UTC

[GitHub] [arrow-datafusion] liukun4515 commented on issue #3268: Introduce `Expr` variants for `IS [NOT] TRUE / FALSE / UNKNOWN`

liukun4515 commented on issue #3268:
URL: https://github.com/apache/arrow-datafusion/issues/3268#issuecomment-1229178185

   > ~Another option would be to add `Operatror::IsTrue` instead of a new `Expr`~
   > 
   > Never mind, `IS TRUE` is a unary expression, not binary.
   
   Hi @andygrove Do we need the  other unary expression for `IS_TRUE, IS_FALSE...`  ?
   I go through preview pr for adding the sql syntax for above expr like that which convert the `IS_TRUE` to the binary expr
   ```
   SQLExpr::IsNotTrue(expr) => Ok(Expr::BinaryExpr {
                   left: Box::new(self.sql_expr_to_logical_expr(*expr, schema, ctes)?),
                   op: Operator::IsDistinctFrom,
                   right: Box::new(lit(true)),
               }),
   ```
   I am not sure if it is a good way.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org