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/25 21:06:27 UTC
[GitHub] [arrow-datafusion] andygrove opened a new issue, #3268: Introduce `Expr` variants for `IS [NOT] TRUE / FALSE / UNKNOWN`
andygrove opened a new issue, #3268:
URL: https://github.com/apache/arrow-datafusion/issues/3268
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
In https://github.com/apache/arrow-datafusion/pull/3252 we added support for SQL `IS [NOT] TRUE/FALSE` by mapping to the existing logical binary operator `Is[Not]DistinctFrom`. This resulted in a small PR compared to introducing new `Expr` variants such as `IsNotTrue`, but the downside is that we are now unable to implement type validation/coercion to ensure that the left expression is a boolean value.
**Describe the solution you'd like**
Introduce new `Expr` variants but still map to the physical plan for `IsDistinctFrom`.
**Describe alternatives you've considered**
None
**Additional context**
None
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] andygrove commented on issue #3268: Introduce `Expr` variants for `IS [NOT] TRUE / FALSE / UNKNOWN`
Posted by GitBox <gi...@apache.org>.
andygrove commented on issue #3268:
URL: https://github.com/apache/arrow-datafusion/issues/3268#issuecomment-1227763208
@sarahyurick fyi
--
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
[GitHub] [arrow-datafusion] liukun4515 commented on issue #3268: Introduce `Expr` variants for `IS [NOT] TRUE / FALSE / UNKNOWN`
Posted by GitBox <gi...@apache.org>.
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
[GitHub] [arrow-datafusion] andygrove closed issue #3268: Introduce `Expr` variants for `IS [NOT] TRUE / FALSE / UNKNOWN`
Posted by GitBox <gi...@apache.org>.
andygrove closed issue #3268: Introduce `Expr` variants for `IS [NOT] TRUE / FALSE / UNKNOWN`
URL: https://github.com/apache/arrow-datafusion/issues/3268
--
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
[GitHub] [arrow-datafusion] andygrove commented on issue #3268: Introduce `Expr` variants for `IS [NOT] TRUE / FALSE / UNKNOWN`
Posted by GitBox <gi...@apache.org>.
andygrove commented on issue #3268:
URL: https://github.com/apache/arrow-datafusion/issues/3268#issuecomment-1227769186
Another option would be to add `Operatror::IsTrue` instead of a new `Expr`.
--
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