HaoYang670 commented on code in PR #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337#discussion_r1117879732
##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -792,29 +786,32 @@ mod tests {
};
use std::sync::Arc;
- fn assert_optimized_plan_eq(plan: &LogicalPlan, expected: &str) ->
Result<()> {
- let optimized_plan = PushDownFilter::new()
- .try_optimize(plan, &OptimizerContext::new())
- .unwrap()
- .expect("failed to optimize plan");
- let formatted_plan = format!("{optimized_plan:?}");
- assert_eq!(plan.schema(), optimized_plan.schema());
- assert_eq!(expected, formatted_plan);
- Ok(())
+ fn assert_optimized_plan_equal(plan: &LogicalPlan, expected: &str) ->
Result<()> {
Review Comment:
This works for me, but this is a nit:
```rust
fn assert_optimized_plan_eq(plan: &LogicalPlan, expected: &str) ->
Result<()> {
crate::test::assert_optimized_plan_eq(Arc::new(PushDownFilter::new()), plan,
expected)
}
```
--
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]