Re: [PR] Stop copying LogicalPlan and Exprs in EliminateNestedUnion [datafusion]

2024-05-02 Thread via GitHub


alamb commented on PR #10319:
URL: https://github.com/apache/datafusion/pull/10319#issuecomment-2091809371

   Thanks again @emgeee 


-- 
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-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org



Re: [PR] Stop copying LogicalPlan and Exprs in EliminateNestedUnion [datafusion]

2024-05-02 Thread via GitHub


alamb merged PR #10319:
URL: https://github.com/apache/datafusion/pull/10319


-- 
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-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org



Re: [PR] Stop copying LogicalPlan and Exprs in EliminateNestedUnion [datafusion]

2024-05-02 Thread via GitHub


alamb commented on code in PR #10319:
URL: https://github.com/apache/datafusion/pull/10319#discussion_r1587597359


##
datafusion/expr/src/expr_rewriter/mod.rs:
##
@@ -250,7 +250,7 @@ fn coerce_exprs_for_schema(
 _ => expr.cast_to(new_type, src_schema),
 }
 } else {
-Ok(expr.clone())

Review Comment:
    



-- 
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-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org



Re: [PR] Stop copying LogicalPlan and Exprs in EliminateNestedUnion [datafusion]

2024-05-01 Thread via GitHub


emgeee commented on PR #10319:
URL: https://github.com/apache/datafusion/pull/10319#issuecomment-2089232074

   I went ahead and fixed the formatting so all tests pass and managed to 
remove 1 clone() call from with in the `coerce_plan_expr_for_schema()` call 
stack.
   
   If we want to optimize `coerce_plan_expr_for_schema` further, I'd definitely 
agree a separate PR makes sense as it is called from a number of other 
locations as well


-- 
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-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org



Re: [PR] Stop copying LogicalPlan and Exprs in EliminateNestedUnion [datafusion]

2024-04-30 Thread via GitHub


alamb commented on PR #10319:
URL: https://github.com/apache/datafusion/pull/10319#issuecomment-2087336456

   (also looks like there are some tests that need to be fixed)


-- 
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-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org



Re: [PR] Stop copying LogicalPlan and Exprs in EliminateNestedUnion [datafusion]

2024-04-30 Thread via GitHub


alamb commented on PR #10319:
URL: https://github.com/apache/datafusion/pull/10319#issuecomment-2087335602

   Marking as draft as I think this PR is no longer waiting on feedback. Please 
mark it as ready for review when it is ready for another look 


-- 
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-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org



Re: [PR] Stop copying LogicalPlan and Exprs in EliminateNestedUnion [datafusion]

2024-04-30 Thread via GitHub


alamb commented on code in PR #10319:
URL: https://github.com/apache/datafusion/pull/10319#discussion_r1585465057


##
datafusion/optimizer/src/eliminate_nested_union.rs:
##
@@ -37,49 +38,61 @@ impl EliminateNestedUnion {
 impl OptimizerRule for EliminateNestedUnion {
 fn try_optimize(
 ,
-plan: ,
+_plan: ,
 _config:  OptimizerConfig,
 ) -> Result> {
+internal_err!("Should have called EliminateFilter::rewrite")

Review Comment:
   ```suggestion
   internal_err!("Should have called EliminateNestedUnion::rewrite")
   ```



-- 
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-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org



Re: [PR] Stop copying LogicalPlan and Exprs in EliminateNestedUnion [datafusion]

2024-04-30 Thread via GitHub


emgeee commented on PR #10319:
URL: https://github.com/apache/datafusion/pull/10319#issuecomment-2086787858

   In addition to updating the interface for this optimizer, I tried to remove 
as many copies as possible but I'm still new to rust + datafusion so I'm very 
much open to suggestions and feedback!


-- 
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-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org