RepositoryC++GBUnited Kingdom
man-group

man-group/sparrow

C++20 idiomatic APIs for the Apache Arrow Columnar Format

146stars
30forks
19issues
1views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: apache-arrow

#1 Repository of the month

3
TINIX TRENDING·Topic: apache

#3 Repository of the month

3
TINIX TRENDING·Topic: cpp20

#3 Repository of the month

sparrow

GHA Linux GHA OSX GHA Windows GHA Docs Codecov Integration tests

C++20 idiomatic APIs for the Apache Arrow Columnar Format

Introduction

sparrow is an implementation of the Apache Arrow Columnar format in C++. It provides array structures with idiomatic APIs and convenient conversions from and to the C interface.

Try it online without any installation ! Try Sparrow in JupyterLite

sparrow requires a modern C++ compiler supporting C++20.

Installation

Package managers

We provide a package for the mamba (or conda) package manager:

mamba install -c conda-forge sparrow

Install from sources

sparrow has a few dependencies that you can install in a mamba environment:

mamba env create -f environment-dev.yml
mamba activate sparrow

You can then create a build directory, and build the project and install it with cmake:

mkdir build
cd build
cmake .. \
    -DCMAKE_BUILD_TYPE=Debug \
    -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
    -DBUILD_EXAMPLES=ON \
    -DBUILD_TESTS=ON \
    -DBUILD_DOCS=ON \
    ..
make install

Usage

Requirements

Compilers:

  • Clang 18 or higher
  • GCC 11.2 or higher
  • Apple Clang 16 or higher
  • MSVC 19.41 or higher

Initialize data with sparrow and extract C data structures

#include "sparrow/sparrow.hpp"
namespace sp = sparrow;

sp::primitive_array<int> ar = { 1, 3, 5, 7, 9 };
auto [arrow_array, arrow_schema] = sp::extract_arrow_structures(std::move(ar));
// Use arrow_array and arrow_schema as you need (serialization, passing it to
// a third party library)
// ...
// You are responsible for releasing the structure in the end
arrow_array.release(&arrow_array);
arrow_schema.release(&arrow_schema);

Initialize data with sparrow and use C data structures

#include "sparrow/sparrow.hpp"
namespace sp = sparrow;

sp::primitive_array<int> ar = { 1, 3, 5, 7, 9 };
// Caution: get_arrow_structures returns pointers, not values
auto [arrow_array, arrow_schema] = sp::get_arrow_structures(ar);
// Use arrow_array and arrow_schema as you need (serialization, passing it to
// a third party library)
// ...
// do NOT release the C structures in the end, the "ar" variable will do it for you

Read data from somewhere and pass it to sparrow

#include "sparrow/sparrow.hpp"
#include "third-party-lib.hpp"
namespace sp = sparrow;
namespace tpl = third_party_library;

ArrowArray array;
ArrowSchema schema;
tpl::read_arrow_structures(&array, &schema);

sp::array ar(&array, &schema);
// Use ar as you need
// ...
// You are responsible for releasing the structure in the end
array.release(&array);
schema.release(&schema);

Read data from somewhere and move it into sparrow

#include "sparrow/sparrow.hpp"
#include "third-party-lib.hpp"
namespace sp = sparrow;
namespace tpl = third_party_library;

ArrowArray array;
ArrowSchema schema;
tpl::read_arrow_structures(&array, &schema);

sp::array ar(std::move(array), std::move(schema));
// Use ar as you need
// ...
// do NOT release the C structures in the end, the "ar" variable will do it for you

Documentation

The documentation (currently being written) can be found at https://man-group.github.io/sparrow/index.html

Acknowledgements

This development has been funded as part of a collaboration between ArcticDB, Bloomberg, and QuantStack.

License

This software is licensed under the Apache License 2.0. See the LICENSE file for details.

Similar Projects

Discover other similar projects and AI models.

RepositoryC++
changkun/modern-cpp-tutorial

📚 Modern C++ Tutorial: C++11 to C++26 On the Fly | https://changkun.de/modern-cpp/

26.0k
Nov 9, 2026
RepositoryC++
owasp-modsecurity/ModSecurity

ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache, IIS and Nginx. It has a robust event-based programming language which provides protection from a range of attacks against web applications and allows for HTTP traffic monitoring, logging and real-time analysis.

9.9k
Nov 30, 2026
RepositoryC++
0voice/cpp_new_features

2021年最新整理, C++ 学习资料,含C++ 11 / 14 / 17 / 20 / 23 新特性、入门教程、推荐书籍、优质文章、学习笔记、教学视频等

6.4k
Jun 18, 2025
RepositoryC++
0voice/cpp_new_features

2021年最新整理, C++ 学习资料,含C++ 11 / 14 / 17 / 20 / 23 新特性、入门教程、推荐书籍、优质文章、学习笔记、教学视频等

6.4k
Jun 18, 2025
RepositoryC++
nghttp2/nghttp2

nghttp2 - HTTP/2 C Library and tools

5.1k
Dec 2, 2026
RepositoryC++
NVIDIA/thrust

[ARCHIVED] The C++ parallel algorithms library. See https://github.com/NVIDIA/cccl

5.0k
Feb 8, 2024
RepositoryC++
spaceandtimefdn/blitzar

Zero-knowledge proof acceleration with GPUs for C++ and Rust

4.9k
Jul 16, 2026
RepositoryC++
R3nzTheCodeGOD/R3nzSkin

Skin changer for League of Legends (LOL)

4.8k
Aug 18, 2024
RepositoryC++
andreasfertig/cppinsights

C++ Insights - See your source code with the eyes of a compiler

4.7k
Oct 26, 2026