Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion .github/workflows/assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

env:
CMAKE_VERSION: "3.19.2"
ARROW_VERSION: "7.0.0"
ARROW_VERSION: "17.0.0"

jobs:
archive:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
container: quay.io/pypa/manylinux2014_x86_64:latest
env:
CMAKE_VERSION: "3.17.3"
ARROW_VERSION: "7.0.0"
ARROW_VERSION: "17.0.0"
CPYTHON_VERSION: "cp37-cp37m"
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
pull_request:

env:
ARROW_VERSION: "7.0.0"
ARROW_VERSION: "17.0.0"

jobs:
cpp:
Expand Down
2 changes: 1 addition & 1 deletion codegen/cpp/fletchgen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ project(
HOMEPAGE_URL "https://github.com/abs-tudelft/fletcher"
LANGUAGES CXX)

find_package(Arrow 7.0.0 CONFIG REQUIRED)
find_package(Arrow 17.0.0 CONFIG REQUIRED)

include(FindThreads)
include(FetchContent)
Expand Down
2 changes: 1 addition & 1 deletion codegen/cpp/fletchgen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ It currently supports only two top-level platforms.
# Prerequisites

- [C++17 compliant compiler](https://clang.llvm.org/)
- [Apache Arrow 7.0+](https://github.com/apache/arrow)
- [Apache Arrow 17.0+](https://github.com/apache/arrow)
- [CMake 3.14+](https://cmake.org/)

# Build & install
Expand Down
4 changes: 2 additions & 2 deletions codegen/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ def initialize_options(self):
install_requires=[
'numpy >= 1.14',
'pandas',
'pyarrow == 7.0',
'pyarrow == 17.0',
],
setup_requires=[
'cython',
'numpy',
'pyarrow == 7.0.0',
'pyarrow == 17.0.0',
'plumbum'
],
classifiers=[
Expand Down
2 changes: 1 addition & 1 deletion common/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ project(
VERSION 0.0.0
LANGUAGES CXX)

find_package(Arrow 7.0.0 CONFIG REQUIRED)
find_package(Arrow 17.0.0 CONFIG REQUIRED)

include(FetchContent)

Expand Down
2 changes: 1 addition & 1 deletion examples/stringwrite/software/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ project(
VERSION 0.0.0
LANGUAGES CXX)

find_package(Arrow 7.0.0 CONFIG REQUIRED)
find_package(Arrow 17.0.0 CONFIG REQUIRED)
find_package(fletcher CONFIG)

if(NOT fletcher)
Expand Down
20 changes: 16 additions & 4 deletions examples/stringwrite/software/cpp/src/stringwrite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,23 @@ std::shared_ptr<arrow::StringArray> DeserializeToArrow(const std::shared_ptr<std

// Allocate space for values buffer
std::shared_ptr<arrow::Buffer> val_buffer;
if (!arrow::AllocateBuffer(values->size(), &val_buffer).ok()) {
auto val_res = arrow::AllocateBuffer(values->size());
if (!val_res.ok()) {
throw std::runtime_error("Could not allocate values buffer.");
} else {
val_buffer = val_res.MoveValueUnsafe();
}

// Copy the values buffer
memcpy(val_buffer->mutable_data(), values->data(), values->size());

// Allocate space for offsets buffer
std::shared_ptr<arrow::Buffer> off_buffer;
if (!arrow::AllocateBuffer((lengths->size() + 1) * sizeof(int32_t), &off_buffer).ok()) {
auto off_res = arrow::AllocateBuffer((lengths->size() + 1) * sizeof(int32_t));
if (!off_res.ok()) {
throw std::runtime_error("Could not allocate offsets buffer.");
} else {
off_buffer = off_res.MoveValueUnsafe();
}

// Lengths need to be converted into offsets
Expand All @@ -140,11 +146,17 @@ std::shared_ptr<arrow::RecordBatch> PrepareRecordBatch(const std::shared_ptr<arr
std::shared_ptr<arrow::Buffer> offsets;
std::shared_ptr<arrow::Buffer> values;

if (!arrow::AllocateBuffer(arrow::default_memory_pool(), sizeof(int32_t) * (num_strings + 1), &offsets).ok()) {
auto off_res = arrow::AllocateBuffer(sizeof(int32_t) * (num_strings + 1));
if (!off_res.ok()) {
throw std::runtime_error("Could not allocate offsets buffer.");
} else {
offsets = off_res.MoveValueUnsafe();
}
if (!arrow::AllocateBuffer(arrow::default_memory_pool(), num_chars, &values).ok()) {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've removed the arrow::default_memory_pool() here, assuming it will default to the default (although it doesn't explicitly state in the Arrow doc)

auto val_res = arrow::AllocateBuffer(num_chars);
if (!val_res.ok()) {
throw std::runtime_error("Could not allocate values buffer.");
} else {
values = val_res.MoveValueUnsafe();
}

auto array = std::make_shared<arrow::StringArray>(num_strings, offsets, values);
Expand Down
2 changes: 1 addition & 1 deletion examples/sum/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ open-source tools.
The examples in this part of the tutorial are written in Python, so you'll need

- Install [Python 3.7+](https://www.python.org/).
- Install [PyArrow 7.0+](https://arrow.apache.org/docs/python/).
- Install [PyArrow 17.0+](https://arrow.apache.org/docs/python/).

Furthermore you'll need to build and install Fletchgen - the Fletcher design
generator tool.
Expand Down
2 changes: 1 addition & 1 deletion examples/sum/software/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ project(
VERSION 0.0.0
LANGUAGES CXX)

find_package(Arrow 7.0 CONFIG REQUIRED)
find_package(Arrow 17.0 CONFIG REQUIRED)
find_package(fletcher CONFIG)

if(NOT fletcher)
Expand Down
2 changes: 1 addition & 1 deletion runtime/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ project(
HOMEPAGE_URL "https://github.com/abs-tudelft/fletcher"
LANGUAGES CXX)

find_package(Arrow 7.0.0 CONFIG REQUIRED)
find_package(Arrow 17.0.0 CONFIG REQUIRED)

include(FetchContent)

Expand Down
2 changes: 1 addition & 1 deletion runtime/cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ applications.

## Requirements

- [Apache Arrow 7.0+ C++ run-time and development headers.](https://arrow.apache.org/install)
- [Apache Arrow 17.0+ C++ run-time and development headers.](https://arrow.apache.org/install)
- A C++17 compliant compiler
- CMake 3.14

Expand Down
4 changes: 2 additions & 2 deletions runtime/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ def initialize_options(self):
install_requires=[
'numpy >= 1.14',
'pandas',
'pyarrow == 7.0.0',
'pyarrow == 17.0.0',
],
setup_requires=[
'cython',
'numpy',
'pyarrow == 7.0.0',
'pyarrow == 17.0.0',
'plumbum',
'pytest-runner'
],
Expand Down