alamb commented on code in PR #20999:
URL: https://github.com/apache/datafusion/pull/20999#discussion_r2949099648
##########
datafusion/common/src/join_type.rs:
##########
@@ -72,11 +72,26 @@ pub enum JoinType {
/// Same logic as the LeftMark Join above, however it returns a record for
each record from the
/// right input.
RightMark,
+ /// Left Single Join
+ ///
+ /// Like a left outer join, but returns an error if more than one row from
the right
+ /// side matches any given row from the left side. This is used for
decorrelating scalar
+ /// subqueries: a scalar subquery must produce at most one row per outer
row, so a single
+ /// join enforces this constraint at runtime.
+ ///
+ /// Semantics:
+ /// - If a left row has exactly one match on the right: returns the
matched pair
+ /// - If a left row has no match on the right: returns the left row with
NULLs for right columns
+ /// - If a left row has more than one match on the right: returns a
runtime error
+ LeftSingle,
Review Comment:
At vertica we called this type of join `PK` join or a `Unique` join as it
assuemes any particular join key is unique
Maybe we can use a similar term here (rather than Single)
`LeftUnique` 🤔
--
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]