Dandandan commented on code in PR #6858:
URL: https://github.com/apache/arrow-datafusion/pull/6858#discussion_r1254292351
##########
datafusion/core/src/physical_optimizer/sort_enforcement.rs:
##########
@@ -1699,6 +1699,37 @@ mod tests {
Ok(())
}
+ #[tokio::test]
+ async fn test_remove_unnecessary_sort5() -> Result<()> {
+ let left_schema = create_test_schema2()?;
+ let right_schema = create_test_schema3()?;
+ let left_input = memory_exec(&left_schema);
+ let parquet_sort_exprs = vec![sort_expr("a", &right_schema)];
+ let right_input = parquet_exec_sorted(&right_schema,
parquet_sort_exprs);
+
+ let on = vec![(
+ Column::new_with_schema("col_a", &left_schema)?,
+ Column::new_with_schema("c", &right_schema)?,
+ )];
+ let join = hash_join_exec(left_input, right_input, on, None,
&JoinType::Inner)?;
+ let physical_plan = sort_exec(vec![sort_expr("a", &join.schema())],
join);
+
+ let expected_input = vec![
+ "SortExec: expr=[a@2 ASC]",
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]