korowa commented on code in PR #9676:
URL: https://github.com/apache/datafusion/pull/9676#discussion_r1575151891
##########
datafusion/core/src/physical_optimizer/join_selection.rs:
##########
@@ -785,6 +828,35 @@ mod tests_statistical {
}]
}
+ /// Create join filter for NLJoinExec with expression `big_col > small_col`
+ /// where both columns are 0-indexed and come from left and right inputs
respectively
+ fn nl_join_filter() -> Option<JoinFilter> {
+ let column_indices = vec![
+ ColumnIndex {
+ index: 0,
+ side: JoinSide::Left,
+ },
+ ColumnIndex {
+ index: 0,
+ side: JoinSide::Right,
+ },
+ ];
+ let intermediate_schema = Schema::new(vec![
+ Field::new("big_col", DataType::Int32, false),
+ Field::new("small_col", DataType::Int32, false),
+ ]);
+ let expression = Arc::new(BinaryExpr::new(
+ Arc::new(Column::new_with_schema("big_col",
&intermediate_schema).unwrap()),
+ Operator::Gt,
+ Arc::new(Column::new_with_schema("big_col",
&intermediate_schema).unwrap()),
Review Comment:
Thank you! Fixed.
(Didn't affect tests, since reordering influenced only by left/right inputs
and their statistics, so filter expression doesn't matter)
--
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]