-
Notifications
You must be signed in to change notification settings - Fork 199
Description
I was reading the semi join implementation and find that the field name: JoinerParams.probe_is_join_side is hard to understand its meaning:
auron/native-engine/datafusion-ext-plans/src/joins/bhj/semi_join.rs
Lines 60 to 64 in d357cbc
| pub struct JoinerParams { | |
| probe_side: ProbeSide, | |
| probe_is_join_side: bool, | |
| mode: SemiMode, | |
| } |
join_side is NOT an adjective, it is a noun, which can be LEFT or RIGHT
auron/native-engine/auron-serde/proto/auron.proto
Lines 678 to 681 in d357cbc
| enum JoinSide { | |
| LEFT_SIDE = 0; | |
| RIGHT_SIDE = 1; | |
| } |
After some digging I think what probe_is_join_side want to say is: whether the probe side is the same as the outer side of the join. e.g. For a left join, if the probe side is on the left, then probe_is_join_side is true, otherwise false. BTW: For a left join, left side is the outer side, right side is the inner side.
So I suggest to rename probe_is_join_side to is_probe_on_outer_side and add some comments to make it more easier to understand.