liukun4515 commented on code in PR #3636:
URL: https://github.com/apache/arrow-datafusion/pull/3636#discussion_r982957302
##########
datafusion/core/src/execution/context.rs:
##########
@@ -1466,10 +1466,9 @@ impl SessionState {
}
let mut rules: Vec<Arc<dyn OptimizerRule + Sync + Send>> = vec![
- // Simplify expressions first to maximize the chance
- // of applying other optimizations
- Arc::new(SimplifyExpressions::new()),
Arc::new(PreCastLitInComparisonExpressions::new()),
Review Comment:
The `PreCastLitInComparisonExpressions` will be invalid when we move the
`type coercion` to the front of `PreCastLitInComparisonExpressions`.
In the next pr, I will do
https://github.com/apache/arrow-datafusion/issues/3622 and move the type
coercion to the front of the `PreCastLitInComparisonExpressions`
I think `type coercion` just do one thing which is make type compatible in
all operation, but the `PreCastLitInComparisonExpressions` or
https://github.com/apache/arrow-datafusion/issues/3622 is to reduce `cast` for
column expr or other expr instead of adding the `cast` to the literal. This
will reduce the cast effort of the runtime.
--
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]