-
Notifications
You must be signed in to change notification settings - Fork 52
Add record batch adapter to zero-copy stream record batches into csp #541
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
base: main
Are you sure you want to change the base?
Conversation
0da8c1a
to
643546c
Compare
Signed-off-by: Arham Chopra <[email protected]>
643546c
to
395a316
Compare
} | ||
else | ||
{ | ||
auto last_time = m_tsArray -> Value( m_numRows - 1 ); |
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 we possibly use std::upper_bound
for this logic? Same with std::find_if
for the small batch case
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 don't think arrow arrays have iterators. We would need to define a forward iterator class to use the std::upper_bound
and std::find_if
methods.
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.
m_tsArray is contiguous right? Wonder if we could create a std::span
of it and then we wouldn't need to define iterators ourselves
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.
Not sure if we can rely on data being contiguous. I would expect Arrow to expose the iterator interface.
|
||
long long findFirstMatchingIndex( DateTime time ) | ||
{ | ||
// Find the first index with time equal or greater than `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.
Same idea, could we use std::lower_bound
here rather than implementing our own binary search?
{ | ||
case ::arrow::TimeUnit::SECOND: | ||
{ | ||
m_multiplier = 1000000000; |
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.
These constants are defined here
Line 20 in d22137c
const int64_t NANOS_PER_SECOND = 1000000000; |
No description provided.