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/10/17 20:43:46 UTC
[GitHub] [arrow-datafusion] andygrove opened a new issue, #3865: Binary expression canonical names are incorrect in some cases
andygrove opened a new issue, #3865:
URL: https://github.com/apache/arrow-datafusion/issues/3865
**Describe the bug**
Consider the following two expressions, which are not the same:
```rust
let expr1 = expr1.and(expr2.or(expr3));
let expr2 = expr1.and(expr2).or(expr3);
```
They both produce the same string from `canonical_name`:
```sql
a < Int32(1) AND b < Int32(2) OR c < Int32(3)
```
**To Reproduce**
**Expected behavior**
They should produce different results:
`expr1.and(expr2.or(expr3))` should produce:
```sql
a < Int32(1) AND (b < Int32(2) OR c < Int32(3))
```
`expr1.and(expr2).or(expr3)` should produce either of these:
```sql
a < Int32(1) AND b < Int32(2) OR c < Int32(3)
(a < Int32(1) AND b < Int32(2)) OR c < Int32(3)
```
**Additional context**
--
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 #3865: Binary expression canonical names are incorrect in some cases
Posted by GitBox <gi...@apache.org>.
andygrove commented on issue #3865:
URL: https://github.com/apache/arrow-datafusion/issues/3865#issuecomment-1282471556
SQL parser precedence logic for reference: https://github.com/sqlparser-rs/sqlparser-rs/blob/main/src/parser.rs#L1552-L1638
--
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] Dandandan closed issue #3865: Binary expression canonical names are incorrect in some cases
Posted by GitBox <gi...@apache.org>.
Dandandan closed issue #3865: Binary expression canonical names are incorrect in some cases
URL: https://github.com/apache/arrow-datafusion/issues/3865
--
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