You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Dandandan (via GitHub)" <gi...@apache.org> on 2023/07/06 11:14:54 UTC
[GitHub] [arrow-datafusion] Dandandan commented on a diff in pull request #6858: Adjustment of HashJoinExec APIs to Preserve Probe Side Order
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org