jayzhan211 commented on code in PR #24873:
URL: https://github.com/apache/datafusion/pull/24873#discussion_r4015711429
##########
datafusion/core/tests/sql/joins.rs:
##########
@@ -530,16 +531,16 @@ async fn
asof_join_broadcasts_multi_partition_right_input() -> Result<()> {
let batches = collect(plan, ctx.task_ctx()).await?;
assert_batches_sorted_eq!(
[
- "+----------+-------+",
- "| trade_id | price |",
- "+----------+-------+",
- "| 1 | |",
- "| 2 | 40 |",
- "| 3 | 60 |",
- "| 4 | 20 |",
- "| 5 | 60 |",
- "| 6 | 20 |",
- "+----------+-------+",
+ "+----------+----+-------+",
+ "| trade_id | ts | price |",
Review Comment:
Do we need another test that drop ordering?
```
// SELECT t.trade_id, p.price ... (no t.ts)
assert!(asof.projection.is_some());
assert!(asof.output_ordering().is_none());
```
##########
datafusion/physical-plan/src/joins/asof_join.rs:
##########
@@ -386,6 +405,16 @@ impl ExecutionPlan for AsOfJoinExec {
vec![&self.left, &self.right]
}
+ fn try_swapping_with_projection(
+ &self,
+ projection: &ProjectionExec,
+ ) -> Result<Option<Arc<dyn ExecutionPlan>>> {
+ if self.projection.is_some() {
+ return Ok(None);
+ }
+ try_embed_projection(projection, self)
Review Comment:
Unlike other joins, we don't call
`try_pushdown_through_join_with_column_indices` to narrow both inputs,
projection is not pushed to children. This could be a follow-up work.
--
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]