-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add InList support for binary type.
#3324
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
Conversation
Signed-off-by: remzi <13716567376yh@gmail.com>
Signed-off-by: remzi <13716567376yh@gmail.com>
|
test failure caused by #3327 |
Codecov Report
@@ Coverage Diff @@
## master #3324 +/- ##
=======================================
Coverage 85.82% 85.83%
=======================================
Files 294 294
Lines 53772 53833 +61
=======================================
+ Hits 46148 46205 +57
- Misses 7624 7628 +4
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
@alamb could you merge this when you have time? |
alamb
left a comment
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.
Look good to me -- thank you @HaoYang670
cc @liukun4515 and @Ted-Jiang who I believe have worked on this code and may know if there is any benchmark we should run
| /// TODO: add switch codeGen in In_List | ||
| static OPTIMIZER_INSET_THRESHOLD: usize = 30; | ||
|
|
||
| macro_rules! compare_op_scalar { |
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.
❤️
| .collect::<Vec<_>>(); | ||
| let native_set: HashSet<&[u8]> = HashSet::from_iter(native_array); |
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.
Can you skip this intermediate Vec and instead go directly to HashSet?
Like .collect::<HashSet<_>>() ?
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 will do this in a follow-up patch as we have this problem in both binary and string
| datatype => unimplemented!("Unexpected type {} for InList", datatype), | ||
| }, | ||
| ColumnarValue::Array(_) => { | ||
| unimplemented!("InList does not yet support nested columns.") |
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 think this case is when one of the arguments to InList is a column (rather than a constant)
So like col1 IN ('1', '2', col2) type thing
(no change needed I was just trying to clarify)
|
Thanks again @HaoYang670 |
|
Benchmark runs are scheduled for baseline = 786c319 and contender = 61602f0. 61602f0 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
* add binary support Signed-off-by: remzi <13716567376yh@gmail.com> * support inset and add tests Signed-off-by: remzi <13716567376yh@gmail.com> * clean Signed-off-by: remzi <13716567376yh@gmail.com> * fmt Signed-off-by: remzi <13716567376yh@gmail.com> Signed-off-by: remzi <13716567376yh@gmail.com>
| &schema | ||
| ); | ||
|
|
||
| // expression: "a in ([1, 2, 3], [4, 5, 6], null)" |
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.
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.
Op, my mistake. Sorry.
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.
Never mind.
You can fix it in the next pr
Which issue does this PR close?
Closes #3300.
Rationale for this change
What changes are included in this PR?
InListandInSetAre there any user-facing changes?