Dandandan commented on code in PR #5611:
URL: https://github.com/apache/arrow-datafusion/pull/5611#discussion_r1137010469
##########
datafusion/expr/src/expr_rewriter/order_by.rs:
##########
@@ -116,7 +116,19 @@ fn rewrite_in_terms_of_projection(
// look for the column named the same as this expr
if let Some(found) = proj_exprs.iter().find(|a|
expr_match(&search_col, a)) {
- return Ok((*found).clone());
+ let found = found.clone();
Review Comment:
The fragile here to me seems to be that the code assumes some naming, and
with casting it removes the cast expression. Ideally we wouldn't depend on the
naming in the code but on the expressions themselves.
--
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]