Skip to content

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

Open
wants to merge 121 commits into
base: main
Choose a base branch
from
Open

introduce ndarr support #98

wants to merge 121 commits into from

Conversation

kafka1991
Copy link
Collaborator

@kafka1991 kafka1991 commented Apr 1, 2025

introduce ndarr support

TODO Lists

  • Line protocol version tests in c, c++ and system tests (rust client done)
  • Rust client's support for common built-in array and vector APIs (for ease of use, less 3 dims)
  • add more system array tests
  • Python client support

@kafka1991 kafka1991 self-assigned this Apr 1, 2025
@kafka1991 kafka1991 marked this pull request as draft April 1, 2025 15:04
@kafka1991 kafka1991 marked this pull request as ready for review April 3, 2025 09:05
@@ -0,0 +1,133 @@
pub(crate) const MAX_DIMS: usize = 32;
Copy link
Collaborator

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 58 to 59
/// Buffer outOfMemory.
BufferOutOfMemory,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -24,8 +24,8 @@

#![doc = include_str!("mod.md")]

pub use self::ndarr::*;
Copy link
Collaborator

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;
Copy link
Collaborator

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.

Copy link
Collaborator

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.

Comment on lines 641 to 645
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)
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants