-
Notifications
You must be signed in to change notification settings - Fork 839
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
Implement concat_elements_dyn kernel #3763
Conversation
right.data_type() | ||
))); | ||
} | ||
match (left.data_type(), right.data_type()) { |
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.
Perhaps we could also handle when the arrays are both LargeUtf8
? Otherwise this is not all that different from the normal kernel?
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.
Certainly, you are correct. I plan to address LargeUtf8 at a later time.
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.
Do I need to write a separate concat function for LargeUtf8
or is it unnecessary since concat_elements_utf8
can already handle LargeUtf8
?
let left = left.as_any().downcast_ref::<StringArray>().unwrap(); | ||
let right = right.as_any().downcast_ref::<StringArray>().unwrap(); | ||
Ok(Arc::new(concat_elements_utf8(left, right).unwrap())) | ||
} |
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.
} | |
} | |
(DataType::LargeUtf8, DataType::LargeUtf8) => { | |
let left = left.as_any().downcast_ref::<LargeStringArray>().unwrap(); | |
let right = right.as_any().downcast_ref::<LargeStringArray>().unwrap(); | |
Ok(Arc::new(concat_elements_utf8(left, right).unwrap())) | |
} |
19f8fb9
to
f371239
Compare
f371239
to
bc6a5ec
Compare
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.
Thank you
left: &GenericBinaryArray<Offset>, | ||
right: &GenericBinaryArray<Offset>, | ||
) -> Result<GenericBinaryArray<Offset>, ArrowError> { | ||
if left.len() != right.len() { |
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 logic can be combined into a concat_element_bytes
I'll see what I can come up with in a follow on PR
Benchmark runs are scheduled for baseline = 661bbad and contender = f8abb04. f8abb04 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Which issue does this PR close?
Closes #1755
Rationale for this change
Explained in #1755
What changes are included in this PR?
Are there any user-facing changes?