Skip to content

Commit 6ea34bb

Browse files
authored
MINOR: [Release][C++][Python] Update versions for 21.0.0 (#380)
Updates C++ and Python cookbooks from 20.0.0 to 21.0.0. Locally I ran `./dev/release/01-bump-versions.sh 20.0.0 21.0.0` locally. Updates cookbook code to be compatible with 21.0.0: - Replace removed GenericToStatus call with new ToStatus - Use Result-returning variant of GetRecordBatchReader - Initialize compute before running tests
1 parent 23bea16 commit 6ea34bb

File tree

8 files changed

+314
-307
lines changed

8 files changed

+314
-307
lines changed

cpp/code/common.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@
2929

3030
#define ARROW_ASSIGN_OR_RAISE_NAME(x, y) ARROW_CONCAT(x, y)
3131

32-
#define ASSERT_OK(expr) \
33-
for (const ::arrow::Status& _st = ::arrow::internal::GenericToStatus((expr)); \
34-
!_st.ok();) \
32+
#define ASSERT_OK(expr) \
33+
for (const ::arrow::Status _st = ::arrow::ToStatus((expr)); !_st.ok();) \
3534
FAIL() << "'" ARROW_STRINGIFY(expr) "' failed with " << _st.ToString()
3635

3736
#define ASSIGN_OR_HANDLE_ERROR_IMPL(handle_error, status_name, lhs, rexpr) \

cpp/code/datasets.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,15 @@
2424
#include <filesystem>
2525
#include <memory>
2626

27+
#include "arrow/compute/initialize.h"
2728
#include "common.h"
2829

2930
class DatasetReadingTest : public ::testing::Test {
3031
public:
3132
void SetUp() override {
33+
// Initialize compute functions before the test runs
34+
ASSERT_OK(arrow::compute::Initialize());
35+
3236
airquality_partitioned_dir_ =
3337
std::filesystem::temp_directory_path() / "cookbook_cpp_airquality";
3438
std::shared_ptr<arrow::fs::FileSystem> fs =

cpp/code/flight.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,9 @@ arrow::Status TestPutGetDelete() {
237237
metadata_reader = std::move(put_stream.reader);
238238

239239
// Upload data
240-
std::shared_ptr<arrow::RecordBatchReader> batch_reader;
241240
std::vector<int> row_groups(reader->num_row_groups());
242241
std::iota(row_groups.begin(), row_groups.end(), 0);
243-
ARROW_RETURN_NOT_OK(reader->GetRecordBatchReader(row_groups, &batch_reader));
242+
ARROW_ASSIGN_OR_RAISE(auto batch_reader, reader->GetRecordBatchReader(row_groups))
244243
int64_t batches = 0;
245244
while (true) {
246245
ARROW_ASSIGN_OR_RAISE(auto batch, batch_reader->Next());

cpp/conda-linux-64.lock

Lines changed: 103 additions & 100 deletions
Large diffs are not rendered by default.

cpp/conda-linux-aarch64.lock

Lines changed: 101 additions & 100 deletions
Large diffs are not rendered by default.

cpp/conda-osx-arm64.lock

Lines changed: 99 additions & 98 deletions
Large diffs are not rendered by default.

cpp/environment.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ channels:
2020
dependencies:
2121
- python=3.9
2222
- compilers
23-
- libarrow==20.0.0
24-
- libarrow-flight==20.0.0
23+
- libarrow==21.0.0
24+
- libarrow-flight==21.0.0
2525
- sphinx
2626
- gtest
2727
- gmock
28-
- pyarrow==20.0.0
28+
- pyarrow==21.0.0
2929
- clang-tools
3030
- zlib

python/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Sphinx>=4.0.2
2-
pyarrow==20.0.0
2+
pyarrow==21.0.0
33
pandas>=1.2.5
44
opentelemetry-api>=1.0.0
55
opentelemetry-sdk>=1.0.0

0 commit comments

Comments
 (0)