-
Notifications
You must be signed in to change notification settings - Fork 19
introduce ndarr support #98
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
questdb-rs/src/ingress/ndarr.rs
Outdated
@@ -0,0 +1,133 @@ | |||
pub(crate) const MAX_DIMS: usize = 32; |
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'd move this top-level in questb::ingress
and make it public, then add a doc to it. It might be useful to callers.
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.
done
questdb-rs/src/error.rs
Outdated
/// Buffer outOfMemory. | ||
BufferOutOfMemory, |
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.
Remove
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.
done
questdb-rs/src/ingress/mod.rs
Outdated
@@ -24,8 +24,8 @@ | |||
|
|||
#![doc = include_str!("mod.md")] | |||
|
|||
pub use self::ndarr::*; |
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.
The *
risks leaking too many types.
Instead just pick the ones you explicitly are sure you want in the public API.
@@ -29,6 +29,9 @@ mod http; | |||
mod mock; | |||
mod sender; | |||
|
|||
#[cfg(feature = "ndarray")] | |||
mod ndarr; |
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 should be tests for the trait directly as well, even without ndarray
enabled.
This is to be sure that we never tie the ndarray
feature to the ability to write arrays.
The tests that check the NdArrayView
trait should also check what happens when the trait does nothing or less data.
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.
Another test to write is if the trait gives back the wrong number of dimensions.
template <typename T, size_t N> | ||
line_sender_buffer& column( | ||
column_name_view name, | ||
const std::vector<uint32_t>& shape, | ||
const std::array<T, N>& data) |
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.
We need to come up with something that's a bit more idiomatic C++.
Let's park the C++ API for now until we have everything else nailed down.
# Conflicts: # questdb-rs/Cargo.toml
This reverts commit c51fef2.
introduce ndarr support
TODO Lists