-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add PhysicalJoinType #572
feat: add PhysicalJoinType #572
Conversation
Question: Is it better for the original ANTI_JOIN enums to default to NO_NULLS or WITH_NULLs? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is null handling part of the type or is it a separate setting/option?
JOIN_TYPE_LEFT_ANTI = 7; | ||
JOIN_TYPE_RIGHT_ANTI = 8; | ||
} | ||
PhysicalJoinType type = 7; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For protobuf compatibility it is better to make this 8 and mark 7 as deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose if we keep all of the values the same as you've done here it would be wire compatible which mean we wouldn't need to renumber the field for the "type" change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it's still technically wire compatible! The Anti Join will have to default to one of the two options though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I change this to be
PHYSICAL_JOIN_TYPE_LEFT_ANTI = 7;
PHYSICAL_JOIN_TYPE_RIGHT_ANTI = 8;
PHYSICAL_JOIN_TYPE_LEFT_ANTI_NULL_AWARE = 9;
PHYSICAL_JOIN_TYPE_RIGHT_ANTI_NULL_AWARE = 10;
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to this ^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated again to use a separate is_null_aware
field in the rels
This Velox documentation makes me think that these are considered different types of anti joins (rather than a separate config): https://facebookincubator.github.io/velox/develop/anti-join.html |
Hmm, although they did implement it slightly differently, using Edit: actually, this is similar to this PR, but the left/right option is configured elsewhere it seems. |
ACTION NEEDED Substrait follows the Conventional Commits The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification. |
I see @westonpace 's old PR here does use a |
Hmm, maybe it would be better to have |
This shouldn't be a breaking binary change, right? |
Yes, good call! Edit: The "Breaking Changes Check" does flag this, though. |
f8bda5d
to
a65e4ce
Compare
JOIN_TYPE_RIGHT_ANTI = 8; | ||
} | ||
PhysicalJoinType type = 7; | ||
bool is_null_aware = 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly does this boolean enable? It would be good to document it.
I've created a new PR specifically for dealing with the Do you want to rescope this PR to just dealing with the join type? |
No progress has been made in more than six months. Closing without prejudice. |
BREAKING CHANGE: the JoinType for physical operators HashJoin, MergeJoin, and
NestedLoopJoin has been refactored into a shared enum called PhysicalJoinType.
It is wire compatible and a new is_null_aware field is added to the physical join rels.
Closes #563