Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/flatbuffer_utils.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <numeric>
#include <string>

#include "compression_impl.hpp"
Expand Down Expand Up @@ -523,7 +524,7 @@ namespace sparrow_ipc
create_fieldnodes(const sparrow::record_batch& record_batch)
{
std::vector<org::apache::arrow::flatbuf::FieldNode> nodes;
nodes.reserve(record_batch.columns().size());
nodes.reserve(record_batch.nb_columns());
for (const auto& column : record_batch.columns())
{
fill_fieldnodes(sparrow::detail::array_access::get_arrow_proxy(column), nodes);
Expand Down Expand Up @@ -608,9 +609,10 @@ namespace sparrow_ipc
std::optional<CompressionType> compression,
std::optional<std::reference_wrapper<CompressionCache>> cache)
{
auto cols = record_batch.columns();
return std::accumulate(
record_batch.columns().begin(),
record_batch.columns().end(),
cols.begin(),
cols.end(),
int64_t{0},
[&](int64_t acc, const sparrow::array& arr)
{
Expand Down
2 changes: 1 addition & 1 deletion src/metadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ namespace sparrow_ipc
);
return sparrow_metadata;
}
}
}
3 changes: 2 additions & 1 deletion src/serialize_utils.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <algorithm>
#include <stdexcept>

#include "sparrow_ipc/flatbuffer_utils.hpp"
Expand Down Expand Up @@ -38,7 +39,7 @@ namespace sparrow_ipc
std::optional<CompressionType> compression,
std::optional<std::reference_wrapper<CompressionCache>> cache)
{
std::for_each(record_batch.columns().begin(), record_batch.columns().end(), [&](const auto& column) {
std::ranges::for_each(record_batch.columns(), [&](const auto& column) {
const auto& arrow_proxy = sparrow::detail::array_access::get_arrow_proxy(column);
fill_body(arrow_proxy, stream, compression, cache);
});
Expand Down
2 changes: 1 addition & 1 deletion src/serializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ namespace sparrow_ipc
m_stream.write(end_of_stream);
m_ended = true;
}
}
}
Loading