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/09/21 05:50:27 UTC
[GitHub] [arrow-datafusion] liukun4515 opened a new issue, #3556: simplify_expressions don't support different data type for binary
liukun4515 opened a new issue, #3556:
URL: https://github.com/apache/arrow-datafusion/issues/3556
**Describe the bug**
A clear and concise description of what the bug is.
in the test case `select_distinct_from`
Run the test case, we will meet the error for optimizer:
```
[2022-09-21T05:22:53Z WARN datafusion_optimizer::optimizer] Skipping optimizer rule 'simplify_expressions' due to unexpected error: Internal error: The type of Int64 IS DISTINCT FROM Int32 o
f binary physical should be same. This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
[2022-09-21T05:22:53Z DEBUG datafusion_optimizer::optimizer] After apply pre_cast_lit_in_comparison rule:
```
**To Reproduce**
Steps to reproduce the behavior:
**Expected behavior**
A clear and concise description of what you expected to happen.
**Additional context**
Add any other context about the problem here.
--
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] liukun4515 commented on issue #3556: simplify_expressions don't support different data type for binary
Posted by GitBox <gi...@apache.org>.
liukun4515 commented on issue #3556:
URL: https://github.com/apache/arrow-datafusion/issues/3556#issuecomment-1256165309
>
> > I think it is not a good way do this.
>
> Upon consideration I agree with your assessment that combining type coercion and simplify_expressions is not a good idea. Thank you for filing #3582
But in the pr https://github.com/apache/arrow-datafusion/pull/3396, I follow your comments temporarily.
We should remove the type coercion from the physical phase first.
--
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 #3556: simplify_expressions don't support different data type for binary
Posted by GitBox <gi...@apache.org>.
liukun4515 commented on issue #3556:
URL: https://github.com/apache/arrow-datafusion/issues/3556#issuecomment-1254452374
> I wonder if we could make type coercion part of "simplify_expressions" 🤔 that way it would always be called at the appropriate time 🤔
I think it is not a good way do this.
`simplify_expressions` rule can be called many times, but the `type_coercion` just can do only once.
We should do the `type_coercion` before all operation and optimization.
I think it is most important: the right data type system is the base of the all things
I submit a issue to talk about this thing https://github.com/apache/arrow-datafusion/issues/3582
@alamb
--
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] alamb closed issue #3556: simplify_expressions don't support different data type for binary
Posted by GitBox <gi...@apache.org>.
alamb closed issue #3556: simplify_expressions don't support different data type for binary
URL: https://github.com/apache/arrow-datafusion/issues/3556
--
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] alamb commented on issue #3556: simplify_expressions don't support different data type for binary
Posted by GitBox <gi...@apache.org>.
alamb commented on issue #3556:
URL: https://github.com/apache/arrow-datafusion/issues/3556#issuecomment-1256030792
> I think it is not a good way do this.
Upon consideration I agree with your assessment that combining type coercion and simplify_expressions is not a good idea. Thank you for filing https://github.com/apache/arrow-datafusion/issues/3582
--
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 #3556: simplify_expressions don't support different data type for binary
Posted by GitBox <gi...@apache.org>.
liukun4515 commented on issue #3556:
URL: https://github.com/apache/arrow-datafusion/issues/3556#issuecomment-1256147380
> > I think it is not a good way do this.
>
> Upon consideration I agree with your assessment that combining type coercion and simplify_expressions is not a good idea. Thank you for filing #3582
If community think the refactor or https://github.com/apache/arrow-datafusion/issues/3582 is on the right/good path, I can do them next.
--
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 #3556: simplify_expressions don't support different data type for binary
Posted by GitBox <gi...@apache.org>.
liukun4515 commented on issue #3556:
URL: https://github.com/apache/arrow-datafusion/issues/3556#issuecomment-1253256102
In the logical phase, we implement the expr simplify with the helper of the physical expr.
cc @alamb
--
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] alamb commented on issue #3556: simplify_expressions don't support different data type for binary
Posted by GitBox <gi...@apache.org>.
alamb commented on issue #3556:
URL: https://github.com/apache/arrow-datafusion/issues/3556#issuecomment-1253988860
@liukun4515 I wonder if we could make type coercion part of "simplify_expressions" 🤔 that way it would always be called at the appropriate time 🤔
--
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 #3556: simplify_expressions don't support different data type for binary
Posted by GitBox <gi...@apache.org>.
liukun4515 commented on issue #3556:
URL: https://github.com/apache/arrow-datafusion/issues/3556#issuecomment-1253264079
I find many test cases meet this issue:
```
thread 'simplify_expressions::tests::now_less_than_timestamp' panicked at 'failed to optimize plan: Internal("The type of Int64 + Int32 of binary physical should be same")', datafusion/optimizer/src/simplify_expressions.rs:1911:14
```
If I remove the type coercion from the physical 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
[GitHub] [arrow-datafusion] liukun4515 commented on issue #3556: simplify_expressions don't support different data type for binary
Posted by GitBox <gi...@apache.org>.
liukun4515 commented on issue #3556:
URL: https://github.com/apache/arrow-datafusion/issues/3556#issuecomment-1253264555
Now I will reassign the optimizer rule, the `TypeCoercion` should be the first rule in the optimizer.
--
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 #3556: simplify_expressions don't support different data type for binary
Posted by GitBox <gi...@apache.org>.
liukun4515 commented on issue #3556:
URL: https://github.com/apache/arrow-datafusion/issues/3556#issuecomment-1253263491
block this pr https://github.com/apache/arrow-datafusion/pull/3396
--
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