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


##########
datafusion/core/tests/physical_optimizer/combine_partial_final_agg.rs:
##########
@@ -43,22 +44,18 @@ use datafusion_physical_plan::ExecutionPlan;
 
 /// Runs the CombinePartialFinalAggregate optimizer and asserts the plan 
against the expected
 macro_rules! assert_optimized {
-    ($EXPECTED_LINES: expr, $PLAN: expr) => {
-        let expected_lines: Vec<&str> = $EXPECTED_LINES.iter().map(|s| 
*s).collect();
+    ($PLAN: expr, @ $EXPECTED_LINES: literal $(,)?) => {
+        // let expected_lines: Vec<&str> = $EXPECTED_LINES.iter().map(|s| 
*s).collect();

Review Comment:
   this can probably be removed now



##########
datafusion/core/tests/physical_optimizer/limited_distinct_aggregation.rs:
##########
@@ -39,16 +40,12 @@ use datafusion_physical_plan::{
     ExecutionPlan,
 };
 
-async fn assert_results_match_expected(
-    plan: Arc<dyn ExecutionPlan>,
-    expected: &str,
-) -> Result<()> {
+async fn assert_results_match_expected(plan: Arc<dyn ExecutionPlan>) -> 
Result<String> {
     let cfg = SessionConfig::new().with_target_partitions(1);
     let ctx = SessionContext::new_with_config(cfg);
     let batches = collect(plan, ctx.task_ctx()).await?;
     let actual = format!("{}", pretty_format_batches(&batches)?);
-    assert_eq!(actual, expected);
-    Ok(())
+    Ok(actual)

Review Comment:
   This seems to have lost the actual checking (it creates the results, but 
then doesn't do anything with actual)
   
   Perhaps we could call it something different than `assert` -- -- perhaps 
`run plan`



-- 
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

Reply via email to