Skip to content

Commit fe13ef3

Browse files
committed
Remove redundant constructor
1 parent 86db184 commit fe13ef3

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

cpp/src/arrow/array.cc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -348,18 +348,8 @@ const uint8_t* FixedSizeBinaryArray::GetValue(int64_t i) const {
348348
DecimalArray::DecimalArray(const std::shared_ptr<internal::ArrayData>& data)
349349
: FixedSizeBinaryArray(data) {
350350
DCHECK_EQ(data->type->id(), Type::DECIMAL);
351-
SetData(data);
352351
}
353352

354-
DecimalArray::DecimalArray(const std::shared_ptr<DataType>& type, int64_t length,
355-
const std::shared_ptr<Buffer>& data,
356-
const std::shared_ptr<Buffer>& null_bitmap, int64_t null_count,
357-
int64_t offset)
358-
: FixedSizeBinaryArray(type, length, data, null_bitmap, null_count, offset) {
359-
BufferVector buffers = {null_bitmap, data};
360-
SetData(
361-
std::make_shared<ArrayData>(type, length, std::move(buffers), null_count, offset));
362-
}
363353

364354
#define DECIMAL_TO_STRING_CASE(bits, bytes, precision, scale) \
365355
case bits: { \

cpp/src/arrow/array.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -538,14 +538,11 @@ class ARROW_EXPORT DecimalArray : public FixedSizeBinaryArray {
538538
public:
539539
using TypeClass = DecimalType;
540540

541+
using FixedSizeBinaryArray::FixedSizeBinaryArray;
542+
541543
/// \brief Construct DecimalArray from internal::ArrayData instance
542544
explicit DecimalArray(const std::shared_ptr<internal::ArrayData>& data);
543545

544-
DecimalArray(const std::shared_ptr<DataType>& type, int64_t length,
545-
const std::shared_ptr<Buffer>& data,
546-
const std::shared_ptr<Buffer>& null_bitmap = nullptr,
547-
int64_t null_count = 0, int64_t offset = 0);
548-
549546
std::string FormatValue(int64_t i) const;
550547

551548
std::shared_ptr<Array> Slice(int64_t offset, int64_t length) const override;

0 commit comments

Comments
 (0)