Skip to content
This repository was archived by the owner on May 10, 2024. It is now read-only.

Commit da0a7eb

Browse files
committed
Update for ARROW-1811
1 parent 16935de commit da0a7eb

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

cmake_modules/ThirdpartyToolchain.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ if (NOT ARROW_FOUND)
366366
-DARROW_BUILD_TESTS=OFF)
367367

368368
if ("$ENV{PARQUET_ARROW_VERSION}" STREQUAL "")
369-
set(ARROW_VERSION "e8331f46f8b324271e694557789ea53b082fdc05")
369+
set(ARROW_VERSION "9fb806ce2ca0ccdee1b89c510dcfae16996cf243")
370370
else()
371371
set(ARROW_VERSION "$ENV{PARQUET_ARROW_VERSION}")
372372
endif()

src/parquet/arrow/arrow-reader-writer-test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1972,7 +1972,7 @@ TEST_P(TestArrowReaderAdHocSpark, ReadDecimals) {
19721972

19731973
std::shared_ptr<Array> expected_array;
19741974

1975-
::arrow::DecimalBuilder builder(decimal_type, pool);
1975+
::arrow::Decimal128Builder builder(decimal_type, pool);
19761976

19771977
for (int32_t i = 0; i < expected_length; ++i) {
19781978
::arrow::Decimal128 value((i + 1) * 100);

src/parquet/arrow/test-util.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ template <int32_t PRECISION>
3434
struct DecimalWithPrecisionAndScale {
3535
static_assert(PRECISION >= 1 && PRECISION <= 38, "Invalid precision value");
3636

37-
using type = ::arrow::DecimalType;
38-
static constexpr ::arrow::Type::type type_id = ::arrow::DecimalType::type_id;
37+
using type = ::arrow::Decimal128Type;
38+
static constexpr ::arrow::Type::type type_id = ::arrow::Decimal128Type::type_id;
3939
static constexpr int32_t precision = PRECISION;
4040
static constexpr int32_t scale = PRECISION - 1;
4141
};
@@ -156,8 +156,9 @@ NonNullArray(size_t size, std::shared_ptr<Array>* out) {
156156
constexpr int32_t kDecimalScale = DecimalWithPrecisionAndScale<precision>::scale;
157157

158158
const auto type = ::arrow::decimal(kDecimalPrecision, kDecimalScale);
159-
::arrow::DecimalBuilder builder(type);
160-
const int32_t byte_width = static_cast<const ::arrow::DecimalType&>(*type).byte_width();
159+
::arrow::Decimal128Builder builder(type);
160+
const int32_t byte_width =
161+
static_cast<const ::arrow::Decimal128Type&>(*type).byte_width();
161162

162163
constexpr int32_t seed = 0;
163164

@@ -317,15 +318,16 @@ NullableArray(size_t size, size_t num_nulls, uint32_t seed,
317318
constexpr int32_t kDecimalPrecision = precision;
318319
constexpr int32_t kDecimalScale = DecimalWithPrecisionAndScale<precision>::scale;
319320
const auto type = ::arrow::decimal(kDecimalPrecision, kDecimalScale);
320-
const int32_t byte_width = static_cast<const ::arrow::DecimalType&>(*type).byte_width();
321+
const int32_t byte_width =
322+
static_cast<const ::arrow::Decimal128Type&>(*type).byte_width();
321323

322324
std::shared_ptr<::arrow::Buffer> out_buf;
323325
RETURN_NOT_OK(::arrow::AllocateBuffer(::arrow::default_memory_pool(), size * byte_width,
324326
&out_buf));
325327

326328
random_decimals(size, seed, precision, out_buf->mutable_data());
327329

328-
::arrow::DecimalBuilder builder(type);
330+
::arrow::Decimal128Builder builder(type);
329331
RETURN_NOT_OK(builder.Append(out_buf->data(), size, valid_bytes.data()));
330332
return builder.Finish(out);
331333
}

0 commit comments

Comments
 (0)