-
Notifications
You must be signed in to change notification settings - Fork 2
Handle different data types #8
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
Hind-M
wants to merge
16
commits into
QuantStack:main
Choose a base branch
from
Hind-M:format_fct
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,037
−474
Open
Changes from 11 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
610259f
Handle different data types
Hind-M 6a737f5
Move utils fcts to utils files
Hind-M 1c4eeba
Add namespaces
Hind-M 9ae4709
Add tests
Hind-M 368c76f
Rename test.cpp
Hind-M cc8065d
Comment possible offending line
Hind-M 6613f78
Change way of testing
Hind-M ccc4313
Factorize
Hind-M 451a198
Comment offending line
Hind-M 7860dc7
Use same comparion for other test cases
Hind-M 44d2552
Add comment and use sp namespace
Hind-M a137693
Move everything to serialize.hpp
Hind-M 121a70b
Remove leftover
Hind-M 4b66da4
Use get_arrow_structures instead of extract_arrow_structures
Hind-M 478d903
Remove leftovers
Hind-M 6d55743
Use string instead of string_view
Hind-M File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
#pragma once | ||
|
||
#include <vector> | ||
|
||
#include "sparrow.hpp" | ||
|
||
#include "config/config.hpp" | ||
|
||
//TODO split serialize/deserialize fcts in two different files or just rename the current one? | ||
template <typename T> | ||
SPARROW_IPC_API std::vector<uint8_t> serialize_primitive_array(const sparrow::primitive_array<T>& arr); | ||
namespace sparrow_ipc | ||
{ | ||
//TODO split serialize/deserialize fcts in two different files or just rename the current one? | ||
template <typename T> | ||
SPARROW_IPC_API std::vector<uint8_t> serialize_primitive_array(const sparrow::primitive_array<T>& arr); | ||
|
||
template <typename T> | ||
SPARROW_IPC_API sparrow::primitive_array<T> deserialize_primitive_array(const std::vector<uint8_t>& buffer); | ||
template <typename T> | ||
SPARROW_IPC_API sparrow::primitive_array<T> deserialize_primitive_array(const std::vector<uint8_t>& buffer); | ||
Hind-M marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#pragma once | ||
|
||
#include <cstdint> | ||
#include <optional> | ||
#include <string_view> | ||
#include <utility> | ||
|
||
#include "Schema_generated.h" | ||
|
||
#include "config/config.hpp" | ||
|
||
namespace sparrow_ipc | ||
{ | ||
namespace utils | ||
{ | ||
// Aligns a value to the next multiple of 8, as required by the Arrow IPC format for message bodies | ||
SPARROW_IPC_API int64_t align_to_8(int64_t n); | ||
|
||
// Creates a Flatbuffers type from a format string | ||
// This function maps a sparrow data type to the corresponding Flatbuffers type | ||
SPARROW_IPC_API std::pair<org::apache::arrow::flatbuf::Type, flatbuffers::Offset<void>> | ||
get_flatbuffer_type(flatbuffers::FlatBufferBuilder& builder, std::string_view format_str); | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN | ||
|
||
#include "doctest/doctest.h" | ||
|
||
//TODO check version? |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.