Skip to content

Commit 00bf619

Browse files
committed
Add more documentation to LeftMark join
1 parent e8c5a8f commit 00bf619

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

datafusion/common/src/join_type.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,19 @@ pub enum JoinType {
4444
LeftAnti,
4545
/// Right Anti Join
4646
RightAnti,
47-
/// Left Mark join, used for correlated subqueries EXIST/IN
47+
/// Left Mark join
48+
///
49+
/// Returns one record for each record from the left input. The output contains an additional
50+
/// column "mark" which is true if there is at least one match in the right input where the
51+
/// join condition evaluates to true. Otherwise, the mark column is false. For more details see
52+
/// [1]. This join type is used to decorrelate EXISTS subqueries used inside disjunctive
53+
/// predicates.
54+
///
55+
/// Note: This we currently do not implement the full null semantics for the mark join described
56+
/// in [1] which will be needed if we and ANY subqueries. In our version the mark column will
57+
/// only be true for had a match and false when no match was found, never null.
58+
///
59+
/// [1] http://btw2017.informatik.uni-stuttgart.de/slidesandpapers/F1-10-37/paper_web.pdf
4860
LeftMark,
4961
}
5062

0 commit comments

Comments
 (0)