-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
MINOR: Implement serde for join filter #2649
Conversation
@korowa fyi |
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.
LGTM, I think you can use transpose to make the code easier to follow
.filter | ||
.as_ref() | ||
.map(|expr| parse_expr(expr, ctx)) | ||
.map_or(Ok(None), |v| v.map(Some))?; |
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 https://doc.rust-lang.org/std/option/enum.Option.html#method.transpose ? I'm having a hard time figuring out what the types are though so could be mistaken
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.
Transpose seems to be appropriate -- I used this map_or call in ballista for conversion from Option<Result>
to Result<Option>
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 copied the code over from Ballista and am not too familiar with what is going on here. @korowa would you mind updating this in a follow on PR?
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.
NP 👌
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.
One copy of serialization for the win! Thank you @andygrove
Which issue does this PR close?
N/A
Rationale for this change
Ballista had this change in its copy of serde and Ballista now delegates to datafusion-proto for logical plan serde so we need this change here.
What changes are included in this PR?
Add JoinNode::filter
Are there any user-facing changes?
No
Does this PR break compatibility with Ballista?
No