wiedld commented on code in PR #15074:
URL: https://github.com/apache/datafusion/pull/15074#discussion_r1985718083


##########
datafusion/core/tests/physical_optimizer/enforce_distribution.rs:
##########
@@ -1542,11 +1562,12 @@ fn multi_smj_joins() -> Result<()> {
                 "        DataSourceExec: file_groups={1 group: [[x]]}, 
projection=[a, b, c, d, e], file_type=parquet",
             ],
         };
-        assert_optimized!(
-            expected_first_sort_enforcement,
+        // TODO(wiedld): show different test result if enforce distribution 
first.
+        test_config.run(
+            &expected_first_sort_enforcement,
             top_join,
-            &TestConfig::new(DoFirst::Sorting).with_prefer_existing_sort()
-        );
+            SORT_DISTRIB_DISTRIB.into(),
+        )?;

Review Comment:
   I left a few `TODO(wiedld)` in the test multi_smj_joins.
   
   In some cases the test case is showing the outcome for the sort occurring 
first BEFORE the distribution run, which does not match the [ordering of the 
optimizer in the default 
planner](https://github.com/apache/datafusion/blob/9a4c9d598ca93ef66ba02067cc1497d53c28cddc/datafusion/physical-optimizer/src/optimizer.rs#L101-L108)
 -- and I thought that should be highlighted in the test cases.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to