-
Notifications
You must be signed in to change notification settings - Fork 175
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]: sql IN
operator
#3086
[FEAT]: sql IN
operator
#3086
Conversation
CodSpeed Performance ReportMerging #3086 will not alter performanceComparing Summary
|
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.
approving. please at least consider recommendations.
let list = list | ||
.iter() | ||
.map(|e| self.plan_lit(e)) | ||
.collect::<SQLPlannerResult<Vec<_>>>()?; |
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.
nit:
.collect::<SQLPlannerResult<Vec<_>>>()?; | |
.try_collect()?; |
and then let list: Vec<_> = ...
This is more appealing to me. Can be done with itertools or since we are using nightly it is a feature as well.
let series = literals_to_series(&list)?; | ||
let series_lit = LiteralValue::Series(series); | ||
let series_expr = Expr::Literal(series_lit); | ||
let series_expr_arc = Arc::new(series_expr); |
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.
nit: use shadowing here (best practice)
https://www.perplexity.ai/search/is-shadowing-best-practice-rus-Acz8Mve6Qy6gZvxbtYDjTA#0
let series_expr = Expr::Literal(series_lit); | ||
let series_expr_arc = Arc::new(series_expr); | ||
let expr = expr.is_in(series_expr_arc); | ||
if *negated { |
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.
this seems to be repeated a bunch. don't know if there is a way to make this simpler negate_if
? or if this is just a bit too much. I could see accidentally missing .not
in one of these. unsure though feel free to do nothing.
closes #3085