ygf11 commented on issue #4140: URL: https://github.com/apache/arrow-datafusion/issues/4140#issuecomment-1308103957
> maybe it related to the subquery and the type coercion. Yes, it is relative to `type coercion`. The issue is not very detailed, Let me add a little more. Currently our `LogicalPlan::Join(..)` only supports `column equality` for join, so does physical plan. https://github.com/apache/arrow-datafusion/blob/a32fb657d1caec634cb53979b2f7ef2fad224905/datafusion/expr/src/logical_plan/plan.rs#L1488 https://github.com/apache/arrow-datafusion/blob/a32fb657d1caec634cb53979b2f7ef2fad224905/datafusion/core/src/physical_plan/joins/hash_join.rs#L125 We can extend `column` to `normal expression`, then datafusion can support more equality joins. That means: * If all columns of left side expression are in the left schema, and so does right side, parse as `equality joins`. * Other wise, parse as `cross join`. For #2877, since the join unit is expression, we can wrap `cast` in `type coercion` phase when data types of two side is not same. -- 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]
