Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
19 changes: 0 additions & 19 deletions cpp/src/arrow/array/array_dict.cc
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,6 @@ Result<std::shared_ptr<Array>> DictionaryArray::FromArrays(
return std::make_shared<DictionaryArray>(type, indices, dictionary);
}

Status DictionaryArray::FromArrays(const std::shared_ptr<DataType>& type,
const std::shared_ptr<Array>& indices,
const std::shared_ptr<Array>& dictionary,
std::shared_ptr<Array>* out) {
return FromArrays(type, indices, dictionary).Value(out);
}

bool DictionaryArray::CanCompareIndices(const DictionaryArray& other) const {
DCHECK(dictionary()->type()->Equals(other.dictionary()->type()))
<< "dictionaries have differing type " << *dictionary()->type() << " vs "
Expand Down Expand Up @@ -287,11 +280,6 @@ Result<std::unique_ptr<DictionaryUnifier>> DictionaryUnifier::Make(
return std::move(maker.result);
}

Status DictionaryUnifier::Make(MemoryPool* pool, std::shared_ptr<DataType> value_type,
std::unique_ptr<DictionaryUnifier>* out) {
return Make(value_type, pool).Value(out);
}

// ----------------------------------------------------------------------
// DictionaryArray transposition

Expand Down Expand Up @@ -392,11 +380,4 @@ Result<std::shared_ptr<Array>> DictionaryArray::Transpose(
#undef TRANSPOSE_IN_OUT_CASE
}

Status DictionaryArray::Transpose(MemoryPool* pool, const std::shared_ptr<DataType>& type,
const std::shared_ptr<Array>& dictionary,
const int32_t* transpose_map,
std::shared_ptr<Array>* out) const {
return Transpose(type, dictionary, transpose_map, pool).Value(out);
}

} // namespace arrow
11 changes: 0 additions & 11 deletions cpp/src/arrow/array/array_dict.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ class ARROW_EXPORT DictionaryArray : public Array {
const std::shared_ptr<DataType>& type, const std::shared_ptr<Array>& indices,
const std::shared_ptr<Array>& dictionary);

ARROW_DEPRECATED("Use Result-returning version")
static Status FromArrays(const std::shared_ptr<DataType>& type,
const std::shared_ptr<Array>& indices,
const std::shared_ptr<Array>& dictionary,
std::shared_ptr<Array>* out);

/// \brief Transpose this DictionaryArray
///
/// This method constructs a new dictionary array with the given dictionary type,
Expand All @@ -98,11 +92,6 @@ class ARROW_EXPORT DictionaryArray : public Array {
const std::shared_ptr<DataType>& type, const std::shared_ptr<Array>& dictionary,
const int32_t* transpose_map, MemoryPool* pool = default_memory_pool()) const;

ARROW_DEPRECATED("Use Result-returning version")
Status Transpose(MemoryPool* pool, const std::shared_ptr<DataType>& type,
const std::shared_ptr<Array>& dictionary, const int32_t* transpose_map,
std::shared_ptr<Array>* out) const;

/// \brief Determine whether dictionary arrays may be compared without unification
bool CanCompareIndices(const DictionaryArray& other) const;

Expand Down
21 changes: 0 additions & 21 deletions cpp/src/arrow/array/array_nested.cc
Original file line number Diff line number Diff line change
Expand Up @@ -250,16 +250,6 @@ Result<std::shared_ptr<Array>> LargeListArray::FromArrays(const Array& offsets,
return ListArrayFromArrays<LargeListType>(offsets, values, pool);
}

Status ListArray::FromArrays(const Array& offsets, const Array& values, MemoryPool* pool,
std::shared_ptr<Array>* out) {
return FromArrays(offsets, values, pool).Value(out);
}

Status LargeListArray::FromArrays(const Array& offsets, const Array& values,
MemoryPool* pool, std::shared_ptr<Array>* out) {
return FromArrays(offsets, values, pool).Value(out);
}

Result<std::shared_ptr<Array>> ListArray::Flatten(MemoryPool* memory_pool) const {
return FlattenListArray(*this, memory_pool);
}
Expand Down Expand Up @@ -326,13 +316,6 @@ Result<std::shared_ptr<Array>> MapArray::FromArrays(const std::shared_ptr<Array>
offsets->offset());
}

Status MapArray::FromArrays(const std::shared_ptr<Array>& offsets,
const std::shared_ptr<Array>& keys,
const std::shared_ptr<Array>& items, MemoryPool* pool,
std::shared_ptr<Array>* out) {
return FromArrays(offsets, keys, items, pool).Value(out);
}

Status MapArray::ValidateChildData(
const std::vector<std::shared_ptr<ArrayData>>& child_data) {
if (child_data.size() != 1) {
Expand Down Expand Up @@ -569,10 +552,6 @@ Result<ArrayVector> StructArray::Flatten(MemoryPool* pool) const {
return flattened;
}

Status StructArray::Flatten(MemoryPool* pool, ArrayVector* out) const {
return Flatten(pool).Value(out);
}

// ----------------------------------------------------------------------
// UnionArray

Expand Down
84 changes: 1 addition & 83 deletions cpp/src/arrow/array/array_nested.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ class ARROW_EXPORT ListArray : public BaseListArray<ListType> {
const Array& offsets, const Array& values,
MemoryPool* pool = default_memory_pool());

ARROW_DEPRECATED("Use Result-returning version")
static Status FromArrays(const Array& offsets, const Array& values, MemoryPool* pool,
std::shared_ptr<Array>* out);

/// \brief Return an Array that is a concatenation of the lists in this array.
///
/// Note that it's different from `values()` in that it takes into
Expand Down Expand Up @@ -151,10 +147,6 @@ class ARROW_EXPORT LargeListArray : public BaseListArray<LargeListType> {
const Array& offsets, const Array& values,
MemoryPool* pool = default_memory_pool());

ARROW_DEPRECATED("Use Result-returning version")
static Status FromArrays(const Array& offsets, const Array& values, MemoryPool* pool,
std::shared_ptr<Array>* out);

/// \brief Return an Array that is a concatenation of the lists in this array.
///
/// Note that it's different from `values()` in that it takes into
Expand Down Expand Up @@ -208,12 +200,6 @@ class ARROW_EXPORT MapArray : public ListArray {
const std::shared_ptr<Array>& offsets, const std::shared_ptr<Array>& keys,
const std::shared_ptr<Array>& items, MemoryPool* pool = default_memory_pool());

ARROW_DEPRECATED("Use Result-returning version")
static Status FromArrays(const std::shared_ptr<Array>& offsets,
const std::shared_ptr<Array>& keys,
const std::shared_ptr<Array>& items, MemoryPool* pool,
std::shared_ptr<Array>* out);

const MapType* map_type() const { return map_type_; }

/// \brief Return array object containing all map keys
Expand Down Expand Up @@ -336,9 +322,6 @@ class ARROW_EXPORT StructArray : public Array {
/// \param[in] pool The pool to allocate null bitmaps from, if necessary
Result<ArrayVector> Flatten(MemoryPool* pool = default_memory_pool()) const;

ARROW_DEPRECATED("Use Result-returning version")
Status Flatten(MemoryPool* pool, ArrayVector* out) const;

private:
// For caching boxed child data
// XXX This is not handled in a thread-safe manner.
Expand Down Expand Up @@ -401,39 +384,6 @@ class ARROW_EXPORT UnionArray : public Array {
type_codes);
}

ARROW_DEPRECATED("Use Result-returning version")
static Status MakeDense(const Array& type_ids, const Array& value_offsets,
const std::vector<std::shared_ptr<Array>>& children,
const std::vector<std::string>& field_names,
const std::vector<type_code_t>& type_codes,
std::shared_ptr<Array>* out) {
return MakeDense(type_ids, value_offsets, children, field_names, type_codes)
.Value(out);
}

ARROW_DEPRECATED("Use Result-returning version")
static Status MakeDense(const Array& type_ids, const Array& value_offsets,
const std::vector<std::shared_ptr<Array>>& children,
const std::vector<std::string>& field_names,
std::shared_ptr<Array>* out) {
return MakeDense(type_ids, value_offsets, children, field_names).Value(out);
}

ARROW_DEPRECATED("Use Result-returning version")
static Status MakeDense(const Array& type_ids, const Array& value_offsets,
const std::vector<std::shared_ptr<Array>>& children,
const std::vector<type_code_t>& type_codes,
std::shared_ptr<Array>* out) {
return MakeDense(type_ids, value_offsets, children, type_codes).Value(out);
}

ARROW_DEPRECATED("Use Result-returning version")
static Status MakeDense(const Array& type_ids, const Array& value_offsets,
const std::vector<std::shared_ptr<Array>>& children,
std::shared_ptr<Array>* out) {
return MakeDense(type_ids, value_offsets, children).Value(out);
}

/// \brief Construct Sparse UnionArray from type_ids and children
///
/// This function does the bare minimum of validation of the offsets and
Expand Down Expand Up @@ -462,38 +412,6 @@ class ARROW_EXPORT UnionArray : public Array {
return MakeSparse(type_ids, children, std::vector<std::string>{}, type_codes);
}

ARROW_DEPRECATED("Use Result-returning version")
static Status MakeSparse(const Array& type_ids,
const std::vector<std::shared_ptr<Array>>& children,
const std::vector<std::string>& field_names,
const std::vector<type_code_t>& type_codes,
std::shared_ptr<Array>* out) {
return MakeSparse(type_ids, children, field_names, type_codes).Value(out);
}

ARROW_DEPRECATED("Use Result-returning version")
static Status MakeSparse(const Array& type_ids,
const std::vector<std::shared_ptr<Array>>& children,
const std::vector<std::string>& field_names,
std::shared_ptr<Array>* out) {
return MakeSparse(type_ids, children, field_names).Value(out);
}

ARROW_DEPRECATED("Use Result-returning version")
static Status MakeSparse(const Array& type_ids,
const std::vector<std::shared_ptr<Array>>& children,
const std::vector<type_code_t>& type_codes,
std::shared_ptr<Array>* out) {
return MakeSparse(type_ids, children, type_codes).Value(out);
}

ARROW_DEPRECATED("Use Result-returning version")
static Status MakeSparse(const Array& type_ids,
const std::vector<std::shared_ptr<Array>>& children,
std::shared_ptr<Array>* out) {
return MakeSparse(type_ids, children).Value(out);
}

/// Note that this buffer does not account for any slice offset
std::shared_ptr<Buffer> type_codes() const { return data_->buffers[1]; }

Expand Down Expand Up @@ -521,7 +439,7 @@ class ARROW_EXPORT UnionArray : public Array {
// Return the given field as an individual array.
// For sparse unions, the returned array has its offset, length and null
// count adjusted.
ARROW_DEPRECATED("Use field(pos)")
ARROW_DEPRECATED("Deprecated in 1.0.0. Use field(pos)")
std::shared_ptr<Array> child(int pos) const;

/// \brief Return the given field as an individual array.
Expand Down
20 changes: 0 additions & 20 deletions cpp/src/arrow/array/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -387,26 +387,6 @@ Result<std::shared_ptr<Array>> MakeArrayFromScalar(const Scalar& scalar, int64_t
return internal::RepeatedArrayFactory(pool, scalar, length).Create();
}

Status MakeArrayOfNull(MemoryPool* pool, const std::shared_ptr<DataType>& type,
int64_t length, std::shared_ptr<Array>* out) {
return MakeArrayOfNull(type, length, pool).Value(out);
}

Status MakeArrayOfNull(const std::shared_ptr<DataType>& type, int64_t length,
std::shared_ptr<Array>* out) {
return MakeArrayOfNull(type, length).Value(out);
}

Status MakeArrayFromScalar(MemoryPool* pool, const Scalar& scalar, int64_t length,
std::shared_ptr<Array>* out) {
return MakeArrayFromScalar(scalar, length, pool).Value(out);
}

Status MakeArrayFromScalar(const Scalar& scalar, int64_t length,
std::shared_ptr<Array>* out) {
return MakeArrayFromScalar(scalar, length).Value(out);
}

namespace internal {

std::vector<ArrayVector> RechunkArraysConsistently(
Expand Down
38 changes: 0 additions & 38 deletions cpp/src/arrow/array/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,44 +54,6 @@ ARROW_EXPORT
Result<std::shared_ptr<Array>> MakeArrayFromScalar(
const Scalar& scalar, int64_t length, MemoryPool* pool = default_memory_pool());

/// \brief Create a strongly-typed Array instance with all elements null
/// \param[in] type the array type
/// \param[in] length the array length
/// \param[out] out resulting Array instance
ARROW_DEPRECATED("Use Result-returning version")
ARROW_EXPORT
Status MakeArrayOfNull(const std::shared_ptr<DataType>& type, int64_t length,
std::shared_ptr<Array>* out);

/// \brief Create a strongly-typed Array instance with all elements null
/// \param[in] pool the pool from which memory for this array will be allocated
/// \param[in] type the array type
/// \param[in] length the array length
/// \param[out] out resulting Array instance
ARROW_DEPRECATED("Use Result-returning version")
ARROW_EXPORT
Status MakeArrayOfNull(MemoryPool* pool, const std::shared_ptr<DataType>& type,
int64_t length, std::shared_ptr<Array>* out);

/// \brief Create an Array instance whose slots are the given scalar
/// \param[in] scalar the value with which to fill the array
/// \param[in] length the array length
/// \param[out] out resulting Array instance
ARROW_DEPRECATED("Use Result-returning version")
ARROW_EXPORT
Status MakeArrayFromScalar(const Scalar& scalar, int64_t length,
std::shared_ptr<Array>* out);

/// \brief Create a strongly-typed Array instance with all elements null
/// \param[in] pool the pool from which memory for this array will be allocated
/// \param[in] scalar the value with which to fill the array
/// \param[in] length the array length
/// \param[out] out resulting Array instance
ARROW_DEPRECATED("Use Result-returning version")
ARROW_EXPORT
Status MakeArrayFromScalar(MemoryPool* pool, const Scalar& scalar, int64_t length,
std::shared_ptr<Array>* out);

namespace internal {

/// Given a number of ArrayVectors, treat each ArrayVector as the
Expand Down
Loading