You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ga...@apache.org on 2023/07/19 08:46:00 UTC
[arrow] branch main updated: GH-36326: [C++] Remove APIs deprecated in v9.0 or earlier (#36675)
This is an automated email from the ASF dual-hosted git repository.
gangwu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new a7958d9a68 GH-36326: [C++] Remove APIs deprecated in v9.0 or earlier (#36675)
a7958d9a68 is described below
commit a7958d9a68ed1fc502199bcccf948b34110b8e33
Author: Ben Harkins <60...@users.noreply.github.com>
AuthorDate: Wed Jul 19 04:45:54 2023 -0400
GH-36326: [C++] Remove APIs deprecated in v9.0 or earlier (#36675)
### Rationale for this change
General cleanup of C++ APIs deprecated for at least a year.
### What changes are included in this PR?
Removes any APIs annotated with `ARROW_DEPRECATED` and an included version `<=9.0`. In a few cases, tests needed to be removed or slightly altered.
### Are these changes tested?
Yes (covered by existing tests) when applicable.
### Are there any user-facing changes?
Yes
* Closes: #36326
Authored-by: benibus <bp...@gmx.com>
Signed-off-by: Gang Wu <us...@gmail.com>
---
cpp/src/arrow/array/array_test.cc | 19 +-----
cpp/src/arrow/array/builder_adaptive.h | 2 -
cpp/src/arrow/array/builder_base.cc | 8 ---
cpp/src/arrow/array/builder_base.h | 9 ---
cpp/src/arrow/compute/api_scalar.cc | 28 --------
cpp/src/arrow/compute/api_scalar.h | 18 ------
cpp/src/arrow/compute/api_vector.cc | 7 --
cpp/src/arrow/compute/api_vector.h | 8 ---
cpp/src/arrow/csv/reader.cc | 21 ------
cpp/src/arrow/csv/reader.h | 13 ----
cpp/src/arrow/flight/client.cc | 78 ----------------------
cpp/src/arrow/flight/client.h | 93 ---------------------------
cpp/src/arrow/flight/flight_internals_test.cc | 21 ------
cpp/src/arrow/flight/server.h | 8 ---
cpp/src/arrow/flight/types.cc | 78 ----------------------
cpp/src/arrow/flight/types.h | 60 -----------------
cpp/src/arrow/io/interfaces.h | 4 --
cpp/src/arrow/record_batch.cc | 8 ---
cpp/src/arrow/record_batch.h | 6 --
cpp/src/arrow/record_batch_test.cc | 28 --------
cpp/src/arrow/table_builder.cc | 24 -------
cpp/src/arrow/table_builder.h | 31 ---------
cpp/src/parquet/arrow/reader.cc | 10 ---
cpp/src/parquet/arrow/reader.h | 27 +++-----
24 files changed, 11 insertions(+), 598 deletions(-)
diff --git a/cpp/src/arrow/array/array_test.cc b/cpp/src/arrow/array/array_test.cc
index 555e40b7b3..0b82a82fbd 100644
--- a/cpp/src/arrow/array/array_test.cc
+++ b/cpp/src/arrow/array/array_test.cc
@@ -1727,21 +1727,6 @@ TYPED_TEST(TestPrimitiveBuilder, TestAppendValuesStdBool) {
this->Check(this->builder_nn_, false);
}
-TYPED_TEST(TestPrimitiveBuilder, TestAdvance) {
- ARROW_SUPPRESS_DEPRECATION_WARNING
- int64_t n = 1000;
- ASSERT_OK(this->builder_->Reserve(n));
-
- ASSERT_OK(this->builder_->Advance(100));
- ASSERT_EQ(100, this->builder_->length());
-
- ASSERT_OK(this->builder_->Advance(900));
-
- int64_t too_many = this->builder_->capacity() - 1000 + 1;
- ASSERT_RAISES(Invalid, this->builder_->Advance(too_many));
- ARROW_UNSUPPRESS_DEPRECATION_WARNING
-}
-
TYPED_TEST(TestPrimitiveBuilder, TestResize) {
int64_t cap = kMinBuilderCapacity * 2;
@@ -1757,9 +1742,7 @@ TYPED_TEST(TestPrimitiveBuilder, TestReserve) {
ASSERT_OK(this->builder_->Reserve(100));
ASSERT_EQ(0, this->builder_->length());
ASSERT_GE(100, this->builder_->capacity());
- ARROW_SUPPRESS_DEPRECATION_WARNING
- ASSERT_OK(this->builder_->Advance(100));
- ARROW_UNSUPPRESS_DEPRECATION_WARNING
+ ASSERT_OK(this->builder_->AppendEmptyValues(100));
ASSERT_EQ(100, this->builder_->length());
ASSERT_GE(100, this->builder_->capacity());
diff --git a/cpp/src/arrow/array/builder_adaptive.h b/cpp/src/arrow/array/builder_adaptive.h
index 382c35789c..0cea571be3 100644
--- a/cpp/src/arrow/array/builder_adaptive.h
+++ b/cpp/src/arrow/array/builder_adaptive.h
@@ -142,7 +142,6 @@ class ARROW_EXPORT AdaptiveUIntBuilder : public internal::AdaptiveIntBuilderBase
explicit AdaptiveUIntBuilder(MemoryPool* pool = default_memory_pool())
: AdaptiveUIntBuilder(sizeof(uint8_t), pool) {}
- using ArrayBuilder::Advance;
using internal::AdaptiveIntBuilderBase::Reset;
/// Scalar append
@@ -182,7 +181,6 @@ class ARROW_EXPORT AdaptiveIntBuilder : public internal::AdaptiveIntBuilderBase
int64_t alignment = kDefaultBufferAlignment)
: AdaptiveIntBuilder(sizeof(uint8_t), pool, alignment) {}
- using ArrayBuilder::Advance;
using internal::AdaptiveIntBuilderBase::Reset;
/// Scalar append
diff --git a/cpp/src/arrow/array/builder_base.cc b/cpp/src/arrow/array/builder_base.cc
index 70da1fbb29..3000aea3e1 100644
--- a/cpp/src/arrow/array/builder_base.cc
+++ b/cpp/src/arrow/array/builder_base.cc
@@ -91,14 +91,6 @@ Status ArrayBuilder::Resize(int64_t capacity) {
return null_bitmap_builder_.Resize(capacity);
}
-Status ArrayBuilder::Advance(int64_t elements) {
- if (length_ + elements > capacity_) {
- return Status::Invalid("Builder must be expanded");
- }
- length_ += elements;
- return null_bitmap_builder_.Advance(elements);
-}
-
namespace {
template <typename ConstIterator>
diff --git a/cpp/src/arrow/array/builder_base.h b/cpp/src/arrow/array/builder_base.h
index abbd61be80..05af850fd1 100644
--- a/cpp/src/arrow/array/builder_base.h
+++ b/cpp/src/arrow/array/builder_base.h
@@ -180,15 +180,6 @@ class ARROW_EXPORT ArrayBuilder {
return Status::NotImplemented("AppendArraySlice for builder for ", *type());
}
- /// For cases where raw data was memcpy'd into the internal buffers, allows us
- /// to advance the length of the builder. It is your responsibility to use
- /// this function responsibly.
- ARROW_DEPRECATED(
- "Deprecated in 6.0.0. ArrayBuilder::Advance is poorly supported and mostly "
- "untested.\nFor low-level control over buffer construction, use BufferBuilder "
- "or TypedBufferBuilder directly.")
- Status Advance(int64_t elements);
-
/// \brief Return result of builder as an internal generic ArrayData
/// object. Resets builder except for dictionary builder
///
diff --git a/cpp/src/arrow/compute/api_scalar.cc b/cpp/src/arrow/compute/api_scalar.cc
index ae7e82fb2f..d7a61d0a55 100644
--- a/cpp/src/arrow/compute/api_scalar.cc
+++ b/cpp/src/arrow/compute/api_scalar.cc
@@ -775,34 +775,6 @@ SCALAR_EAGER_BINARY(Or, "or")
SCALAR_EAGER_BINARY(Xor, "xor")
SCALAR_EAGER_UNARY(Invert, "invert")
-// ----------------------------------------------------------------------
-
-Result<Datum> Compare(const Datum& left, const Datum& right, CompareOptions options,
- ExecContext* ctx) {
- std::string func_name;
- switch (options.op) {
- case CompareOperator::EQUAL:
- func_name = "equal";
- break;
- case CompareOperator::NOT_EQUAL:
- func_name = "not_equal";
- break;
- case CompareOperator::GREATER:
- func_name = "greater";
- break;
- case CompareOperator::GREATER_EQUAL:
- func_name = "greater_equal";
- break;
- case CompareOperator::LESS:
- func_name = "less";
- break;
- case CompareOperator::LESS_EQUAL:
- func_name = "less_equal";
- break;
- }
- return CallFunction(func_name, {left, right}, nullptr, ctx);
-}
-
// ----------------------------------------------------------------------
// Validity functions
diff --git a/cpp/src/arrow/compute/api_scalar.h b/cpp/src/arrow/compute/api_scalar.h
index 10a2b4bffd..0a06a2829f 100644
--- a/cpp/src/arrow/compute/api_scalar.h
+++ b/cpp/src/arrow/compute/api_scalar.h
@@ -970,24 +970,6 @@ Result<Datum> RoundTemporal(
const Datum& arg, RoundTemporalOptions options = RoundTemporalOptions::Defaults(),
ExecContext* ctx = NULLPTR);
-/// \brief Compare a numeric array with a scalar.
-///
-/// \param[in] left datum to compare, must be an Array
-/// \param[in] right datum to compare, must be a Scalar of the same type than
-/// left Datum.
-/// \param[in] options compare options
-/// \param[in] ctx the function execution context, optional
-/// \return resulting datum
-///
-/// Note on floating point arrays, this uses ieee-754 compare semantics.
-///
-/// \since 1.0.0
-/// \note API not yet finalized
-ARROW_DEPRECATED("Deprecated in 5.0.0. Use each compare function directly")
-ARROW_EXPORT
-Result<Datum> Compare(const Datum& left, const Datum& right, CompareOptions options,
- ExecContext* ctx = NULLPTR);
-
/// \brief Invert the values of a boolean datum
/// \param[in] value datum to invert
/// \param[in] ctx the function execution context, optional
diff --git a/cpp/src/arrow/compute/api_vector.cc b/cpp/src/arrow/compute/api_vector.cc
index 67595c3308..f73b10e11e 100644
--- a/cpp/src/arrow/compute/api_vector.cc
+++ b/cpp/src/arrow/compute/api_vector.cc
@@ -417,12 +417,5 @@ Result<Datum> CumulativeMin(const Datum& values, const CumulativeOptions& option
return CallFunction("cumulative_min", {Datum(values)}, &options, ctx);
}
-// ----------------------------------------------------------------------
-// Deprecated functions
-
-Result<std::shared_ptr<Array>> SortToIndices(const Array& values, ExecContext* ctx) {
- return SortIndices(values, SortOrder::Ascending, ctx);
-}
-
} // namespace compute
} // namespace arrow
diff --git a/cpp/src/arrow/compute/api_vector.h b/cpp/src/arrow/compute/api_vector.h
index c85db1aa3b..4f226ac007 100644
--- a/cpp/src/arrow/compute/api_vector.h
+++ b/cpp/src/arrow/compute/api_vector.h
@@ -683,13 +683,5 @@ Result<std::shared_ptr<Array>> PairwiseDiff(const Array& array,
bool check_overflow = false,
ExecContext* ctx = NULLPTR);
-// ----------------------------------------------------------------------
-// Deprecated functions
-
-ARROW_DEPRECATED("Deprecated in 3.0.0. Use SortIndices()")
-ARROW_EXPORT
-Result<std::shared_ptr<Array>> SortToIndices(const Array& values,
- ExecContext* ctx = NULLPTR);
-
} // namespace compute
} // namespace arrow
diff --git a/cpp/src/arrow/csv/reader.cc b/cpp/src/arrow/csv/reader.cc
index fdc7fcb138..bf703b6c6b 100644
--- a/cpp/src/arrow/csv/reader.cc
+++ b/cpp/src/arrow/csv/reader.cc
@@ -1246,27 +1246,6 @@ Result<std::shared_ptr<TableReader>> TableReader::Make(
parse_options, convert_options);
}
-Result<std::shared_ptr<TableReader>> TableReader::Make(
- MemoryPool* pool, io::IOContext io_context, std::shared_ptr<io::InputStream> input,
- const ReadOptions& read_options, const ParseOptions& parse_options,
- const ConvertOptions& convert_options) {
- return MakeTableReader(pool, io_context, std::move(input), read_options, parse_options,
- convert_options);
-}
-
-Result<std::shared_ptr<StreamingReader>> StreamingReader::Make(
- MemoryPool* pool, std::shared_ptr<io::InputStream> input,
- const ReadOptions& read_options, const ParseOptions& parse_options,
- const ConvertOptions& convert_options) {
- auto io_context = io::IOContext(pool);
- auto cpu_executor = arrow::internal::GetCpuThreadPool();
- auto reader_fut = MakeStreamingReader(io_context, std::move(input), cpu_executor,
- read_options, parse_options, convert_options);
- auto reader_result = reader_fut.result();
- ARROW_ASSIGN_OR_RAISE(auto reader, reader_result);
- return reader;
-}
-
Result<std::shared_ptr<StreamingReader>> StreamingReader::Make(
io::IOContext io_context, std::shared_ptr<io::InputStream> input,
const ReadOptions& read_options, const ParseOptions& parse_options,
diff --git a/cpp/src/arrow/csv/reader.h b/cpp/src/arrow/csv/reader.h
index 03b953d005..bae301dc14 100644
--- a/cpp/src/arrow/csv/reader.h
+++ b/cpp/src/arrow/csv/reader.h
@@ -52,13 +52,6 @@ class ARROW_EXPORT TableReader {
const ReadOptions&,
const ParseOptions&,
const ConvertOptions&);
-
- ARROW_DEPRECATED(
- "Deprecated in 4.0.0. "
- "Use MemoryPool-less variant (the IOContext holds a pool already)")
- static Result<std::shared_ptr<TableReader>> Make(
- MemoryPool* pool, io::IOContext io_context, std::shared_ptr<io::InputStream> input,
- const ReadOptions&, const ParseOptions&, const ConvertOptions&);
};
/// \brief A class that reads a CSV file incrementally
@@ -105,12 +98,6 @@ class ARROW_EXPORT StreamingReader : public RecordBatchReader {
static Result<std::shared_ptr<StreamingReader>> Make(
io::IOContext io_context, std::shared_ptr<io::InputStream> input,
const ReadOptions&, const ParseOptions&, const ConvertOptions&);
-
- ARROW_DEPRECATED("Deprecated in 4.0.0. Use IOContext-based overload")
- static Result<std::shared_ptr<StreamingReader>> Make(
- MemoryPool* pool, std::shared_ptr<io::InputStream> input,
- const ReadOptions& read_options, const ParseOptions& parse_options,
- const ConvertOptions& convert_options);
};
/// \brief Count the logical rows of data in a CSV file (i.e. the
diff --git a/cpp/src/arrow/flight/client.cc b/cpp/src/arrow/flight/client.cc
index e5e9f141aa..ec5377b7c1 100644
--- a/cpp/src/arrow/flight/client.cc
+++ b/cpp/src/arrow/flight/client.cc
@@ -79,16 +79,6 @@ arrow::Result<std::shared_ptr<Table>> FlightStreamReader::ToTable(
return Table::FromRecordBatches(schema, std::move(batches));
}
-Status FlightStreamReader::ReadAll(std::vector<std::shared_ptr<RecordBatch>>* batches,
- const StopToken& stop_token) {
- return ToRecordBatches(stop_token).Value(batches);
-}
-
-Status FlightStreamReader::ReadAll(std::shared_ptr<Table>* table,
- const StopToken& stop_token) {
- return ToTable(stop_token).Value(table);
-}
-
/// \brief An ipc::MessageReader adapting the Flight ClientDataStream interface.
///
/// In order to support app_metadata and reuse the existing IPC
@@ -520,11 +510,6 @@ arrow::Result<std::unique_ptr<FlightClient>> FlightClient::Connect(
return Connect(location, FlightClientOptions::Defaults());
}
-Status FlightClient::Connect(const Location& location,
- std::unique_ptr<FlightClient>* client) {
- return Connect(location, FlightClientOptions::Defaults()).Value(client);
-}
-
arrow::Result<std::unique_ptr<FlightClient>> FlightClient::Connect(
const Location& location, const FlightClientOptions& options) {
flight::transport::grpc::InitializeFlightGrpcClient();
@@ -538,11 +523,6 @@ arrow::Result<std::unique_ptr<FlightClient>> FlightClient::Connect(
return client;
}
-Status FlightClient::Connect(const Location& location, const FlightClientOptions& options,
- std::unique_ptr<FlightClient>* client) {
- return Connect(location, options).Value(client);
-}
-
Status FlightClient::Authenticate(const FlightCallOptions& options,
std::unique_ptr<ClientAuthHandler> auth_handler) {
RETURN_NOT_OK(CheckOpen());
@@ -564,11 +544,6 @@ arrow::Result<std::unique_ptr<ResultStream>> FlightClient::DoAction(
return results;
}
-Status FlightClient::DoAction(const FlightCallOptions& options, const Action& action,
- std::unique_ptr<ResultStream>* results) {
- return DoAction(options, action).Value(results);
-}
-
arrow::Result<CancelFlightInfoResult> FlightClient::CancelFlightInfo(
const FlightCallOptions& options, const CancelFlightInfoRequest& request) {
ARROW_ASSIGN_OR_RAISE(auto body, request.SerializeToString());
@@ -601,11 +576,6 @@ arrow::Result<std::vector<ActionType>> FlightClient::ListActions(
return actions;
}
-Status FlightClient::ListActions(const FlightCallOptions& options,
- std::vector<ActionType>* actions) {
- return ListActions(options).Value(actions);
-}
-
arrow::Result<std::unique_ptr<FlightInfo>> FlightClient::GetFlightInfo(
const FlightCallOptions& options, const FlightDescriptor& descriptor) {
std::unique_ptr<FlightInfo> info;
@@ -614,32 +584,16 @@ arrow::Result<std::unique_ptr<FlightInfo>> FlightClient::GetFlightInfo(
return info;
}
-Status FlightClient::GetFlightInfo(const FlightCallOptions& options,
- const FlightDescriptor& descriptor,
- std::unique_ptr<FlightInfo>* info) {
- return GetFlightInfo(options, descriptor).Value(info);
-}
-
arrow::Result<std::unique_ptr<SchemaResult>> FlightClient::GetSchema(
const FlightCallOptions& options, const FlightDescriptor& descriptor) {
RETURN_NOT_OK(CheckOpen());
return transport_->GetSchema(options, descriptor);
}
-Status FlightClient::GetSchema(const FlightCallOptions& options,
- const FlightDescriptor& descriptor,
- std::unique_ptr<SchemaResult>* schema_result) {
- return GetSchema(options, descriptor).Value(schema_result);
-}
-
arrow::Result<std::unique_ptr<FlightListing>> FlightClient::ListFlights() {
return ListFlights({}, {});
}
-Status FlightClient::ListFlights(std::unique_ptr<FlightListing>* listing) {
- return ListFlights({}, {}).Value(listing);
-}
-
arrow::Result<std::unique_ptr<FlightListing>> FlightClient::ListFlights(
const FlightCallOptions& options, const Criteria& criteria) {
std::unique_ptr<FlightListing> listing;
@@ -648,12 +602,6 @@ arrow::Result<std::unique_ptr<FlightListing>> FlightClient::ListFlights(
return listing;
}
-Status FlightClient::ListFlights(const FlightCallOptions& options,
- const Criteria& criteria,
- std::unique_ptr<FlightListing>* listing) {
- return ListFlights(options, criteria).Value(listing);
-}
-
arrow::Result<std::unique_ptr<FlightStreamReader>> FlightClient::DoGet(
const FlightCallOptions& options, const Ticket& ticket) {
RETURN_NOT_OK(CheckOpen());
@@ -668,11 +616,6 @@ arrow::Result<std::unique_ptr<FlightStreamReader>> FlightClient::DoGet(
return stream_reader;
}
-Status FlightClient::DoGet(const FlightCallOptions& options, const Ticket& ticket,
- std::unique_ptr<FlightStreamReader>* stream) {
- return DoGet(options, ticket).Value(stream);
-}
-
arrow::Result<FlightClient::DoPutResult> FlightClient::DoPut(
const FlightCallOptions& options, const FlightDescriptor& descriptor,
const std::shared_ptr<Schema>& schema) {
@@ -689,17 +632,6 @@ arrow::Result<FlightClient::DoPutResult> FlightClient::DoPut(
return result;
}
-Status FlightClient::DoPut(const FlightCallOptions& options,
- const FlightDescriptor& descriptor,
- const std::shared_ptr<Schema>& schema,
- std::unique_ptr<FlightStreamWriter>* writer,
- std::unique_ptr<FlightMetadataReader>* reader) {
- ARROW_ASSIGN_OR_RAISE(auto result, DoPut(options, descriptor, schema));
- *writer = std::move(result.writer);
- *reader = std::move(result.reader);
- return Status::OK();
-}
-
arrow::Result<FlightClient::DoExchangeResult> FlightClient::DoExchange(
const FlightCallOptions& options, const FlightDescriptor& descriptor) {
RETURN_NOT_OK(CheckOpen());
@@ -717,16 +649,6 @@ arrow::Result<FlightClient::DoExchangeResult> FlightClient::DoExchange(
return result;
}
-Status FlightClient::DoExchange(const FlightCallOptions& options,
- const FlightDescriptor& descriptor,
- std::unique_ptr<FlightStreamWriter>* writer,
- std::unique_ptr<FlightStreamReader>* reader) {
- ARROW_ASSIGN_OR_RAISE(auto result, DoExchange(options, descriptor));
- *writer = std::move(result.writer);
- *reader = std::move(result.reader);
- return Status::OK();
-}
-
Status FlightClient::Close() {
if (!closed_) {
closed_ = true;
diff --git a/cpp/src/arrow/flight/client.h b/cpp/src/arrow/flight/client.h
index ba9f688dce..7204b469a6 100644
--- a/cpp/src/arrow/flight/client.h
+++ b/cpp/src/arrow/flight/client.h
@@ -139,17 +139,9 @@ class ARROW_FLIGHT_EXPORT FlightStreamReader : public MetadataRecordBatchReader
virtual arrow::Result<std::vector<std::shared_ptr<RecordBatch>>> ToRecordBatches(
const StopToken& stop_token) = 0;
- using MetadataRecordBatchReader::ReadAll;
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use ToRecordBatches instead.")
- Status ReadAll(std::vector<std::shared_ptr<RecordBatch>>* batches,
- const StopToken& stop_token);
-
using MetadataRecordBatchReader::ToTable;
/// \brief Consume entire stream as a Table
arrow::Result<std::shared_ptr<Table>> ToTable(const StopToken& stop_token);
-
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use ToTable instead.")
- Status ReadAll(std::shared_ptr<Table>* table, const StopToken& stop_token);
};
// Silence warning
@@ -196,9 +188,6 @@ class ARROW_FLIGHT_EXPORT FlightClient {
/// the connection was successful
static arrow::Result<std::unique_ptr<FlightClient>> Connect(const Location& location);
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- static Status Connect(const Location& location, std::unique_ptr<FlightClient>* client);
-
/// \brief Connect to an unauthenticated flight service
/// \param[in] location the URI
/// \param[in] options Other options for setting up the client
@@ -207,10 +196,6 @@ class ARROW_FLIGHT_EXPORT FlightClient {
static arrow::Result<std::unique_ptr<FlightClient>> Connect(
const Location& location, const FlightClientOptions& options);
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- static Status Connect(const Location& location, const FlightClientOptions& options,
- std::unique_ptr<FlightClient>* client);
-
/// \brief Authenticate to the server using the given handler.
/// \param[in] options Per-RPC options
/// \param[in] auth_handler The authentication mechanism to use
@@ -239,14 +224,6 @@ class ARROW_FLIGHT_EXPORT FlightClient {
return DoAction({}, action);
}
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status DoAction(const FlightCallOptions& options, const Action& action,
- std::unique_ptr<ResultStream>* results);
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status DoAction(const Action& action, std::unique_ptr<ResultStream>* results) {
- return DoAction({}, action).Value(results);
- }
-
/// \brief Perform the CancelFlightInfo action, returning a
/// CancelFlightInfoResult
///
@@ -281,13 +258,6 @@ class ARROW_FLIGHT_EXPORT FlightClient {
return ListActions(FlightCallOptions());
}
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status ListActions(const FlightCallOptions& options, std::vector<ActionType>* actions);
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status ListActions(std::vector<ActionType>* actions) {
- return ListActions().Value(actions);
- }
-
/// \brief Request access plan for a single flight, which may be an existing
/// dataset or a command to be executed
/// \param[in] options Per-RPC options
@@ -301,16 +271,6 @@ class ARROW_FLIGHT_EXPORT FlightClient {
return GetFlightInfo({}, descriptor);
}
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status GetFlightInfo(const FlightCallOptions& options,
- const FlightDescriptor& descriptor,
- std::unique_ptr<FlightInfo>* info);
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status GetFlightInfo(const FlightDescriptor& descriptor,
- std::unique_ptr<FlightInfo>* info) {
- return GetFlightInfo({}, descriptor).Value(info);
- }
-
/// \brief Request schema for a single flight, which may be an existing
/// dataset or a command to be executed
/// \param[in] options Per-RPC options
@@ -320,27 +280,15 @@ class ARROW_FLIGHT_EXPORT FlightClient {
arrow::Result<std::unique_ptr<SchemaResult>> GetSchema(
const FlightCallOptions& options, const FlightDescriptor& descriptor);
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status GetSchema(const FlightCallOptions& options, const FlightDescriptor& descriptor,
- std::unique_ptr<SchemaResult>* schema_result);
-
arrow::Result<std::unique_ptr<SchemaResult>> GetSchema(
const FlightDescriptor& descriptor) {
return GetSchema({}, descriptor);
}
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status GetSchema(const FlightDescriptor& descriptor,
- std::unique_ptr<SchemaResult>* schema_result) {
- return GetSchema({}, descriptor).Value(schema_result);
- }
/// \brief List all available flights known to the server
/// \return Arrow result with an iterator that returns a FlightInfo for each flight
arrow::Result<std::unique_ptr<FlightListing>> ListFlights();
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status ListFlights(std::unique_ptr<FlightListing>* listing);
-
/// \brief List available flights given indicated filter criteria
/// \param[in] options Per-RPC options
/// \param[in] criteria the filter criteria (opaque)
@@ -348,10 +296,6 @@ class ARROW_FLIGHT_EXPORT FlightClient {
arrow::Result<std::unique_ptr<FlightListing>> ListFlights(
const FlightCallOptions& options, const Criteria& criteria);
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status ListFlights(const FlightCallOptions& options, const Criteria& criteria,
- std::unique_ptr<FlightListing>* listing);
-
/// \brief Given a flight ticket and schema, request to be sent the
/// stream. Returns record batch stream reader
/// \param[in] options Per-RPC options
@@ -363,14 +307,6 @@ class ARROW_FLIGHT_EXPORT FlightClient {
return DoGet({}, ticket);
}
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status DoGet(const FlightCallOptions& options, const Ticket& ticket,
- std::unique_ptr<FlightStreamReader>* stream);
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status DoGet(const Ticket& ticket, std::unique_ptr<FlightStreamReader>* stream) {
- return DoGet({}, ticket).Value(stream);
- }
-
/// \brief DoPut return value
struct DoPutResult {
/// \brief a writer to write record batches to
@@ -399,21 +335,6 @@ class ARROW_FLIGHT_EXPORT FlightClient {
return DoPut({}, descriptor, schema);
}
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status DoPut(const FlightCallOptions& options, const FlightDescriptor& descriptor,
- const std::shared_ptr<Schema>& schema,
- std::unique_ptr<FlightStreamWriter>* writer,
- std::unique_ptr<FlightMetadataReader>* reader);
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status DoPut(const FlightDescriptor& descriptor, const std::shared_ptr<Schema>& schema,
- std::unique_ptr<FlightStreamWriter>* writer,
- std::unique_ptr<FlightMetadataReader>* reader) {
- ARROW_ASSIGN_OR_RAISE(auto output, DoPut({}, descriptor, schema));
- *writer = std::move(output.writer);
- *reader = std::move(output.reader);
- return Status::OK();
- }
-
struct DoExchangeResult {
std::unique_ptr<FlightStreamWriter> writer;
std::unique_ptr<FlightStreamReader> reader;
@@ -424,20 +345,6 @@ class ARROW_FLIGHT_EXPORT FlightClient {
return DoExchange({}, descriptor);
}
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status DoExchange(const FlightCallOptions& options, const FlightDescriptor& descriptor,
- std::unique_ptr<FlightStreamWriter>* writer,
- std::unique_ptr<FlightStreamReader>* reader);
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status DoExchange(const FlightDescriptor& descriptor,
- std::unique_ptr<FlightStreamWriter>* writer,
- std::unique_ptr<FlightStreamReader>* reader) {
- ARROW_ASSIGN_OR_RAISE(auto output, DoExchange({}, descriptor));
- *writer = std::move(output.writer);
- *reader = std::move(output.reader);
- return Status::OK();
- }
-
/// \brief Explicitly shut down and clean up the client.
///
/// For backwards compatibility, this will be implicitly called by
diff --git a/cpp/src/arrow/flight/flight_internals_test.cc b/cpp/src/arrow/flight/flight_internals_test.cc
index 87cd1ca887..27c13ff949 100644
--- a/cpp/src/arrow/flight/flight_internals_test.cc
+++ b/cpp/src/arrow/flight/flight_internals_test.cc
@@ -381,27 +381,6 @@ TEST(FlightTypes, LocationConstruction) {
ASSERT_EQ(location.ToString(), "grpc+unix:///tmp/test.sock");
}
-ARROW_SUPPRESS_DEPRECATION_WARNING
-TEST(FlightTypes, DeprecatedLocationConstruction) {
- Location location;
- ASSERT_RAISES(Invalid, Location::Parse("This is not an URI", &location));
- ASSERT_RAISES(Invalid,
- Location::ForGrpcTcp("This is not a hostname", 12345, &location));
- ASSERT_RAISES(Invalid,
- Location::ForGrpcTls("This is not a hostname", 12345, &location));
- ASSERT_RAISES(Invalid, Location::ForGrpcUnix("This is not a filename", &location));
-
- ASSERT_OK(Location::Parse("s3://test", &location));
- ASSERT_EQ(location.ToString(), "s3://test");
- ASSERT_OK(Location::ForGrpcTcp("localhost", 12345, &location));
- ASSERT_EQ(location.ToString(), "grpc+tcp://localhost:12345");
- ASSERT_OK(Location::ForGrpcTls("localhost", 12345, &location));
- ASSERT_EQ(location.ToString(), "grpc+tls://localhost:12345");
- ASSERT_OK(Location::ForGrpcUnix("/tmp/test.sock", &location));
- ASSERT_EQ(location.ToString(), "grpc+unix:///tmp/test.sock");
-}
-ARROW_UNSUPPRESS_DEPRECATION_WARNING
-
// ----------------------------------------------------------------------
// Cookie authentication/middleware
diff --git a/cpp/src/arrow/flight/server.h b/cpp/src/arrow/flight/server.h
index 6fb8ab1213..5c15d8d564 100644
--- a/cpp/src/arrow/flight/server.h
+++ b/cpp/src/arrow/flight/server.h
@@ -53,18 +53,10 @@ class ARROW_FLIGHT_EXPORT FlightDataStream {
/// \brief Compute FlightPayload containing serialized RecordBatch schema
virtual arrow::Result<FlightPayload> GetSchemaPayload() = 0;
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status GetSchemaPayload(FlightPayload* payload) {
- return GetSchemaPayload().Value(payload);
- }
-
// When the stream is completed, the last payload written will have null
// metadata
virtual arrow::Result<FlightPayload> Next() = 0;
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status Next(FlightPayload* payload) { return Next().Value(payload); }
-
virtual Status Close();
};
diff --git a/cpp/src/arrow/flight/types.cc b/cpp/src/arrow/flight/types.cc
index 44c0c6547c..7c72595ed6 100644
--- a/cpp/src/arrow/flight/types.cc
+++ b/cpp/src/arrow/flight/types.cc
@@ -158,11 +158,6 @@ arrow::Result<std::unique_ptr<SchemaResult>> SchemaResult::Make(const Schema& sc
return std::make_unique<SchemaResult>(std::move(schema_in));
}
-Status SchemaResult::GetSchema(ipc::DictionaryMemo* dictionary_memo,
- std::shared_ptr<Schema>* out) const {
- return GetSchema(dictionary_memo).Value(out);
-}
-
std::string SchemaResult::ToString() const {
return "<SchemaResult raw_schema=(serialized)>";
}
@@ -206,10 +201,6 @@ arrow::Result<std::string> FlightDescriptor::SerializeToString() const {
return out;
}
-Status FlightDescriptor::SerializeToString(std::string* out) const {
- return SerializeToString().Value(out);
-}
-
arrow::Result<FlightDescriptor> FlightDescriptor::Deserialize(
std::string_view serialized) {
pb::FlightDescriptor pb_descriptor;
@@ -226,11 +217,6 @@ arrow::Result<FlightDescriptor> FlightDescriptor::Deserialize(
return out;
}
-Status FlightDescriptor::Deserialize(const std::string& serialized,
- FlightDescriptor* out) {
- return Deserialize(serialized).Value(out);
-}
-
std::string Ticket::ToString() const {
std::stringstream ss;
ss << "<Ticket ticket='" << ticket << "'>";
@@ -250,10 +236,6 @@ arrow::Result<std::string> Ticket::SerializeToString() const {
return out;
}
-Status Ticket::SerializeToString(std::string* out) const {
- return SerializeToString().Value(out);
-}
-
arrow::Result<Ticket> Ticket::Deserialize(std::string_view serialized) {
pb::Ticket pb_ticket;
if (serialized.size() > static_cast<size_t>(std::numeric_limits<int>::max())) {
@@ -269,10 +251,6 @@ arrow::Result<Ticket> Ticket::Deserialize(std::string_view serialized) {
return out;
}
-Status Ticket::Deserialize(const std::string& serialized, Ticket* out) {
- return Deserialize(serialized).Value(out);
-}
-
arrow::Result<FlightInfo> FlightInfo::Make(const Schema& schema,
const FlightDescriptor& descriptor,
const std::vector<FlightEndpoint>& endpoints,
@@ -299,11 +277,6 @@ arrow::Result<std::shared_ptr<Schema>> FlightInfo::GetSchema(
return schema_;
}
-Status FlightInfo::GetSchema(ipc::DictionaryMemo* dictionary_memo,
- std::shared_ptr<Schema>* out) const {
- return GetSchema(dictionary_memo).Value(out);
-}
-
arrow::Result<std::string> FlightInfo::SerializeToString() const {
pb::FlightInfo pb_info;
RETURN_NOT_OK(internal::ToProto(*this, &pb_info));
@@ -315,10 +288,6 @@ arrow::Result<std::string> FlightInfo::SerializeToString() const {
return out;
}
-Status FlightInfo::SerializeToString(std::string* out) const {
- return SerializeToString().Value(out);
-}
-
arrow::Result<std::unique_ptr<FlightInfo>> FlightInfo::Deserialize(
std::string_view serialized) {
pb::FlightInfo pb_info;
@@ -335,11 +304,6 @@ arrow::Result<std::unique_ptr<FlightInfo>> FlightInfo::Deserialize(
return std::make_unique<FlightInfo>(std::move(data));
}
-Status FlightInfo::Deserialize(const std::string& serialized,
- std::unique_ptr<FlightInfo>* out) {
- return Deserialize(serialized).Value(out);
-}
-
std::string FlightInfo::ToString() const {
std::stringstream ss;
ss << "<FlightInfo schema=";
@@ -412,50 +376,30 @@ arrow::Result<CancelFlightInfoRequest> CancelFlightInfoRequest::Deserialize(
Location::Location() { uri_ = std::make_shared<arrow::internal::Uri>(); }
-Status FlightListing::Next(std::unique_ptr<FlightInfo>* info) {
- return Next().Value(info);
-}
-
arrow::Result<Location> Location::Parse(const std::string& uri_string) {
Location location;
RETURN_NOT_OK(location.uri_->Parse(uri_string));
return location;
}
-Status Location::Parse(const std::string& uri_string, Location* location) {
- return Parse(uri_string).Value(location);
-}
-
arrow::Result<Location> Location::ForGrpcTcp(const std::string& host, const int port) {
std::stringstream uri_string;
uri_string << "grpc+tcp://" << host << ':' << port;
return Location::Parse(uri_string.str());
}
-Status Location::ForGrpcTcp(const std::string& host, const int port, Location* location) {
- return ForGrpcTcp(host, port).Value(location);
-}
-
arrow::Result<Location> Location::ForGrpcTls(const std::string& host, const int port) {
std::stringstream uri_string;
uri_string << "grpc+tls://" << host << ':' << port;
return Location::Parse(uri_string.str());
}
-Status Location::ForGrpcTls(const std::string& host, const int port, Location* location) {
- return ForGrpcTls(host, port).Value(location);
-}
-
arrow::Result<Location> Location::ForGrpcUnix(const std::string& path) {
std::stringstream uri_string;
uri_string << "grpc+unix://" << path;
return Location::Parse(uri_string.str());
}
-Status Location::ForGrpcUnix(const std::string& path, Location* location) {
- return ForGrpcUnix(path).Value(location);
-}
-
arrow::Result<Location> Location::ForScheme(const std::string& scheme,
const std::string& host, const int port) {
std::stringstream uri_string;
@@ -808,8 +752,6 @@ std::ostream& operator<<(std::ostream& os, CancelStatus status) {
return os;
}
-Status ResultStream::Next(std::unique_ptr<Result>* info) { return Next().Value(info); }
-
Status ResultStream::Drain() {
while (true) {
ARROW_ASSIGN_OR_RAISE(auto result, Next());
@@ -818,10 +760,6 @@ Status ResultStream::Drain() {
return Status::OK();
}
-Status MetadataRecordBatchReader::Next(FlightStreamChunk* next) {
- return Next().Value(next);
-}
-
arrow::Result<std::vector<std::shared_ptr<RecordBatch>>>
MetadataRecordBatchReader::ToRecordBatches() {
std::vector<std::shared_ptr<RecordBatch>> batches;
@@ -833,21 +771,12 @@ MetadataRecordBatchReader::ToRecordBatches() {
return batches;
}
-Status MetadataRecordBatchReader::ReadAll(
- std::vector<std::shared_ptr<RecordBatch>>* batches) {
- return ToRecordBatches().Value(batches);
-}
-
arrow::Result<std::shared_ptr<Table>> MetadataRecordBatchReader::ToTable() {
ARROW_ASSIGN_OR_RAISE(auto batches, ToRecordBatches());
ARROW_ASSIGN_OR_RAISE(auto schema, GetSchema());
return Table::FromRecordBatches(schema, std::move(batches));
}
-Status MetadataRecordBatchReader::ReadAll(std::shared_ptr<Table>* table) {
- return ToTable().Value(table);
-}
-
Status MetadataRecordBatchWriter::Begin(const std::shared_ptr<Schema>& schema) {
return Begin(schema, ipc::IpcWriteOptions::Defaults());
}
@@ -934,10 +863,6 @@ arrow::Result<BasicAuth> BasicAuth::Deserialize(std::string_view serialized) {
return out;
}
-Status BasicAuth::Deserialize(const std::string& serialized, BasicAuth* out) {
- return Deserialize(serialized).Value(out);
-}
-
arrow::Result<std::string> BasicAuth::SerializeToString() const {
pb::BasicAuth pb_result;
RETURN_NOT_OK(internal::ToProto(*this, &pb_result));
@@ -948,8 +873,5 @@ arrow::Result<std::string> BasicAuth::SerializeToString() const {
return out;
}
-Status BasicAuth::Serialize(const BasicAuth& basic_auth, std::string* out) {
- return basic_auth.SerializeToString().Value(out);
-}
} // namespace flight
} // namespace arrow
diff --git a/cpp/src/arrow/flight/types.h b/cpp/src/arrow/flight/types.h
index 3cca774314..ca86c27e86 100644
--- a/cpp/src/arrow/flight/types.h
+++ b/cpp/src/arrow/flight/types.h
@@ -311,12 +311,6 @@ struct ARROW_FLIGHT_EXPORT BasicAuth {
static arrow::Result<BasicAuth> Deserialize(std::string_view serialized);
/// \brief Serialize this message to its wire-format representation.
arrow::Result<std::string> SerializeToString() const;
-
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- static Status Deserialize(const std::string& serialized, BasicAuth* out);
-
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- static Status Serialize(const BasicAuth& basic_auth, std::string* out);
};
/// \brief A request to retrieve or generate a dataset
@@ -349,18 +343,12 @@ struct ARROW_FLIGHT_EXPORT FlightDescriptor {
/// services) that may want to return Flight types.
arrow::Result<std::string> SerializeToString() const;
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status SerializeToString(std::string* out) const;
-
/// \brief Parse the wire-format representation of this type.
///
/// Useful when interoperating with non-Flight systems (e.g. REST
/// services) that may want to return Flight types.
static arrow::Result<FlightDescriptor> Deserialize(std::string_view serialized);
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- static Status Deserialize(const std::string& serialized, FlightDescriptor* out);
-
// Convenience factory functions
static FlightDescriptor Command(const std::string& c) {
@@ -400,17 +388,11 @@ struct ARROW_FLIGHT_EXPORT Ticket {
/// services) that may want to return Flight types.
arrow::Result<std::string> SerializeToString() const;
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status SerializeToString(std::string* out) const;
-
/// \brief Parse the wire-format representation of this type.
///
/// Useful when interoperating with non-Flight systems (e.g. REST
/// services) that may want to return Flight types.
static arrow::Result<Ticket> Deserialize(std::string_view serialized);
-
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- static Status Deserialize(const std::string& serialized, Ticket* out);
};
class FlightClient;
@@ -434,9 +416,6 @@ struct ARROW_FLIGHT_EXPORT Location {
/// \brief Initialize a location by parsing a URI string
static arrow::Result<Location> Parse(const std::string& uri_string);
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- static Status Parse(const std::string& uri_string, Location* location);
-
/// \brief Initialize a location for a non-TLS, gRPC-based Flight
/// service from a host and port
/// \param[in] host The hostname to connect to
@@ -444,9 +423,6 @@ struct ARROW_FLIGHT_EXPORT Location {
/// \return Arrow result with the resulting location
static arrow::Result<Location> ForGrpcTcp(const std::string& host, const int port);
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- static Status ForGrpcTcp(const std::string& host, const int port, Location* location);
-
/// \brief Initialize a location for a TLS-enabled, gRPC-based Flight
/// service from a host and port
/// \param[in] host The hostname to connect to
@@ -454,18 +430,12 @@ struct ARROW_FLIGHT_EXPORT Location {
/// \return Arrow result with the resulting location
static arrow::Result<Location> ForGrpcTls(const std::string& host, const int port);
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- static Status ForGrpcTls(const std::string& host, const int port, Location* location);
-
/// \brief Initialize a location for a domain socket-based Flight
/// service
/// \param[in] path The path to the domain socket
/// \return Arrow result with the resulting location
static arrow::Result<Location> ForGrpcUnix(const std::string& path);
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- static Status ForGrpcUnix(const std::string& path, Location* location);
-
/// \brief Initialize a location based on a URI scheme
static arrow::Result<Location> ForScheme(const std::string& scheme,
const std::string& host, const int port);
@@ -576,10 +546,6 @@ struct ARROW_FLIGHT_EXPORT SchemaResult {
arrow::Result<std::shared_ptr<Schema>> GetSchema(
ipc::DictionaryMemo* dictionary_memo) const;
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status GetSchema(ipc::DictionaryMemo* dictionary_memo,
- std::shared_ptr<Schema>* out) const;
-
const std::string& serialized_schema() const { return raw_schema_; }
std::string ToString() const;
@@ -633,10 +599,6 @@ class ARROW_FLIGHT_EXPORT FlightInfo {
arrow::Result<std::shared_ptr<Schema>> GetSchema(
ipc::DictionaryMemo* dictionary_memo) const;
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status GetSchema(ipc::DictionaryMemo* dictionary_memo,
- std::shared_ptr<Schema>* out) const;
-
const std::string& serialized_schema() const { return data_.schema; }
/// The descriptor associated with this flight, may not be set
@@ -661,9 +623,6 @@ class ARROW_FLIGHT_EXPORT FlightInfo {
/// services) that may want to return Flight types.
arrow::Result<std::string> SerializeToString() const;
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status SerializeToString(std::string* out) const;
-
/// \brief Parse the wire-format representation of this type.
///
/// Useful when interoperating with non-Flight systems (e.g. REST
@@ -671,10 +630,6 @@ class ARROW_FLIGHT_EXPORT FlightInfo {
static arrow::Result<std::unique_ptr<FlightInfo>> Deserialize(
std::string_view serialized);
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- static Status Deserialize(const std::string& serialized,
- std::unique_ptr<FlightInfo>* out);
-
std::string ToString() const;
/// Compare two FlightInfo for equality. This will compare the
@@ -727,9 +682,6 @@ class ARROW_FLIGHT_EXPORT FlightListing {
/// \return Arrow result with a single FlightInfo. Set to \a nullptr if there
/// are none left.
virtual arrow::Result<std::unique_ptr<FlightInfo>> Next() = 0;
-
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status Next(std::unique_ptr<FlightInfo>* info);
};
/// \brief An iterator to Result instances returned by DoAction.
@@ -741,9 +693,6 @@ class ARROW_FLIGHT_EXPORT ResultStream {
/// \return Arrow result with a single Result. Set to \a nullptr if there are none left.
virtual arrow::Result<std::unique_ptr<Result>> Next() = 0;
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status Next(std::unique_ptr<Result>* info);
-
/// \brief Read and drop the remaining messages to get the error (if any) from a server.
/// \return Status OK if this is no error from a server, any other status if a
/// server returns an error.
@@ -770,20 +719,11 @@ class ARROW_FLIGHT_EXPORT MetadataRecordBatchReader {
/// nullptr.
virtual arrow::Result<FlightStreamChunk> Next() = 0;
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.")
- Status Next(FlightStreamChunk* next);
-
/// \brief Consume entire stream as a vector of record batches
virtual arrow::Result<std::vector<std::shared_ptr<RecordBatch>>> ToRecordBatches();
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use ToRecordBatches instead.")
- Status ReadAll(std::vector<std::shared_ptr<RecordBatch>>* batches);
-
/// \brief Consume entire stream as a Table
virtual arrow::Result<std::shared_ptr<Table>> ToTable();
-
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use ToTable instead.")
- Status ReadAll(std::shared_ptr<Table>* table);
};
/// \brief Convert a MetadataRecordBatchReader to a regular RecordBatchReader.
diff --git a/cpp/src/arrow/io/interfaces.h b/cpp/src/arrow/io/interfaces.h
index c5355c9422..dcbe4feb26 100644
--- a/cpp/src/arrow/io/interfaces.h
+++ b/cpp/src/arrow/io/interfaces.h
@@ -96,10 +96,6 @@ struct ARROW_EXPORT IOContext {
StopToken stop_token_;
};
-struct ARROW_DEPRECATED("renamed to IOContext in 4.0.0") AsyncContext : public IOContext {
- using IOContext::IOContext;
-};
-
class ARROW_EXPORT FileInterface {
public:
virtual ~FileInterface() = 0;
diff --git a/cpp/src/arrow/record_batch.cc b/cpp/src/arrow/record_batch.cc
index 3ce99d6f84..683e72878b 100644
--- a/cpp/src/arrow/record_batch.cc
+++ b/cpp/src/arrow/record_batch.cc
@@ -348,19 +348,11 @@ Result<RecordBatchVector> RecordBatchReader::ToRecordBatches() {
return batches;
}
-Status RecordBatchReader::ReadAll(RecordBatchVector* batches) {
- return ToRecordBatches().Value(batches);
-}
-
Result<std::shared_ptr<Table>> RecordBatchReader::ToTable() {
ARROW_ASSIGN_OR_RAISE(auto batches, ToRecordBatches());
return Table::FromRecordBatches(schema(), std::move(batches));
}
-Status RecordBatchReader::ReadAll(std::shared_ptr<Table>* table) {
- return ToTable().Value(table);
-}
-
class SimpleRecordBatchReader : public RecordBatchReader {
public:
SimpleRecordBatchReader(Iterator<std::shared_ptr<RecordBatch>> it,
diff --git a/cpp/src/arrow/record_batch.h b/cpp/src/arrow/record_batch.h
index 8f9b5882d9..d728d5eb0d 100644
--- a/cpp/src/arrow/record_batch.h
+++ b/cpp/src/arrow/record_batch.h
@@ -326,15 +326,9 @@ class ARROW_EXPORT RecordBatchReader {
/// \brief Consume entire stream as a vector of record batches
Result<RecordBatchVector> ToRecordBatches();
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use ToRecordBatches instead.")
- Status ReadAll(RecordBatchVector* batches);
-
/// \brief Read all batches and concatenate as arrow::Table
Result<std::shared_ptr<Table>> ToTable();
- ARROW_DEPRECATED("Deprecated in 8.0.0. Use ToTable instead.")
- Status ReadAll(std::shared_ptr<Table>* table);
-
/// \brief Create a RecordBatchReader from a vector of RecordBatch.
///
/// \param[in] batches the vector of RecordBatch to read from
diff --git a/cpp/src/arrow/record_batch_test.cc b/cpp/src/arrow/record_batch_test.cc
index def6dbc54e..4975e94325 100644
--- a/cpp/src/arrow/record_batch_test.cc
+++ b/cpp/src/arrow/record_batch_test.cc
@@ -496,32 +496,4 @@ TEST_F(TestRecordBatchReader, ToTable) {
ASSERT_EQ(table->column(0)->chunks().size(), 0);
}
-ARROW_SUPPRESS_DEPRECATION_WARNING
-TEST_F(TestRecordBatchReader, DeprecatedReadAllToRecordBatches) {
- RecordBatchVector batches;
- ASSERT_OK(reader_->ReadAll(&batches));
- ASSERT_EQ(batches.size(), batches_.size());
- for (size_t index = 0; index < batches.size(); index++) {
- AssertBatchesEqual(*batches[index], *batches_[index]);
- }
-
- ASSERT_OK(reader_->ReadAll(&batches));
- ASSERT_EQ(batches.size(), 0);
-}
-
-TEST_F(TestRecordBatchReader, DeprecatedReadAllToTable) {
- std::shared_ptr<Table> table;
-
- ASSERT_OK(reader_->ReadAll(&table));
- const auto& chunks = table->column(0)->chunks();
- ASSERT_EQ(chunks.size(), batches_.size());
- for (size_t index = 0; index < batches_.size(); index++) {
- AssertArraysEqual(*chunks[index], *batches_[index]->column(0));
- }
-
- ASSERT_OK(reader_->ReadAll(&table));
- ASSERT_EQ(table->column(0)->chunks().size(), 0);
-}
-ARROW_UNSUPPRESS_DEPRECATION_WARNING
-
} // namespace arrow
diff --git a/cpp/src/arrow/table_builder.cc b/cpp/src/arrow/table_builder.cc
index 414aa263cc..19ca151ac2 100644
--- a/cpp/src/arrow/table_builder.cc
+++ b/cpp/src/arrow/table_builder.cc
@@ -36,19 +36,6 @@ RecordBatchBuilder::RecordBatchBuilder(const std::shared_ptr<Schema>& schema,
MemoryPool* pool, int64_t initial_capacity)
: schema_(schema), initial_capacity_(initial_capacity), pool_(pool) {}
-Status RecordBatchBuilder::Make(const std::shared_ptr<Schema>& schema, MemoryPool* pool,
- std::unique_ptr<RecordBatchBuilder>* builder) {
- ARROW_ASSIGN_OR_RAISE(*builder, Make(schema, pool, kMinBuilderCapacity))
- return Status::OK();
-}
-
-Status RecordBatchBuilder::Make(const std::shared_ptr<Schema>& schema, MemoryPool* pool,
- int64_t initial_capacity,
- std::unique_ptr<RecordBatchBuilder>* builder) {
- ARROW_ASSIGN_OR_RAISE(*builder, Make(schema, pool, initial_capacity))
- return Status::OK();
-}
-
Result<std::unique_ptr<RecordBatchBuilder>> RecordBatchBuilder::Make(
const std::shared_ptr<Schema>& schema, MemoryPool* pool) {
return Make(schema, pool, kMinBuilderCapacity);
@@ -63,17 +50,6 @@ Result<std::unique_ptr<RecordBatchBuilder>> RecordBatchBuilder::Make(
return std::move(builder);
}
-Status RecordBatchBuilder::Flush(bool reset_builders,
- std::shared_ptr<RecordBatch>* batch) {
- ARROW_ASSIGN_OR_RAISE(*batch, Flush(reset_builders));
- return Status::OK();
-}
-
-Status RecordBatchBuilder::Flush(std::shared_ptr<RecordBatch>* batch) {
- ARROW_ASSIGN_OR_RAISE(*batch, Flush(true));
- return Status::OK();
-}
-
Result<std::shared_ptr<RecordBatch>> RecordBatchBuilder::Flush(bool reset_builders) {
std::vector<std::shared_ptr<Array>> fields;
fields.resize(this->num_fields());
diff --git a/cpp/src/arrow/table_builder.h b/cpp/src/arrow/table_builder.h
index 65ebd86ea4..671cc4ab97 100644
--- a/cpp/src/arrow/table_builder.h
+++ b/cpp/src/arrow/table_builder.h
@@ -38,24 +38,6 @@ class RecordBatch;
/// schema
class ARROW_EXPORT RecordBatchBuilder {
public:
- /// \brief Create and initialize a RecordBatchBuilder
- /// \param[in] schema The schema for the record batch
- /// \param[in] pool A MemoryPool to use for allocations
- /// \param[in] builder the created builder instance
- ARROW_DEPRECATED("Deprecated in 9.0.0. Use Result-returning variant.")
- static Status Make(const std::shared_ptr<Schema>& schema, MemoryPool* pool,
- std::unique_ptr<RecordBatchBuilder>* builder);
-
- /// \brief Create and initialize a RecordBatchBuilder
- /// \param[in] schema The schema for the record batch
- /// \param[in] pool A MemoryPool to use for allocations
- /// \param[in] initial_capacity The initial capacity for the builders
- /// \param[in] builder the created builder instance
- ARROW_DEPRECATED("Deprecated in 9.0.0. Use Result-returning variant.")
- static Status Make(const std::shared_ptr<Schema>& schema, MemoryPool* pool,
- int64_t initial_capacity,
- std::unique_ptr<RecordBatchBuilder>* builder);
-
/// \brief Create and initialize a RecordBatchBuilder
/// \param[in] schema The schema for the record batch
/// \param[in] pool A MemoryPool to use for allocations
@@ -84,19 +66,6 @@ class ARROW_EXPORT RecordBatchBuilder {
return internal::checked_cast<T*>(raw_field_builders_[i]);
}
- /// \brief Finish current batch and optionally reset
- /// \param[in] reset_builders the resulting RecordBatch
- /// \param[out] batch the resulting RecordBatch
- /// \return Status
- ARROW_DEPRECATED("Deprecated in 9.0.0. Use Result-returning variant.")
- Status Flush(bool reset_builders, std::shared_ptr<RecordBatch>* batch);
-
- /// \brief Finish current batch and reset
- /// \param[out] batch the resulting RecordBatch
- /// \return Status
- ARROW_DEPRECATED("Deprecated in 9.0.0. Use Result-returning variant.")
- Status Flush(std::shared_ptr<RecordBatch>* batch);
-
/// \brief Finish current batch and optionally reset
/// \param[in] reset_builders the resulting RecordBatch
/// \return the resulting RecordBatch
diff --git a/cpp/src/parquet/arrow/reader.cc b/cpp/src/parquet/arrow/reader.cc
index 855fb5a5a4..142119b770 100644
--- a/cpp/src/parquet/arrow/reader.cc
+++ b/cpp/src/parquet/arrow/reader.cc
@@ -259,16 +259,6 @@ class FileReaderImpl : public FileReader {
reader_->metadata()->key_value_metadata(), out);
}
- Status ReadSchemaField(int i, std::shared_ptr<ChunkedArray>* out) override {
- auto included_leaves = VectorToSharedSet(Iota(reader_->metadata()->num_columns()));
- std::vector<int> row_groups = Iota(reader_->metadata()->num_row_groups());
-
- std::unique_ptr<ColumnReaderImpl> reader;
- RETURN_NOT_OK(GetFieldReader(i, included_leaves, row_groups, &reader));
-
- return ReadColumn(i, row_groups, reader.get(), out);
- }
-
Status ReadColumn(int i, const std::vector<int>& row_groups, ColumnReader* reader,
std::shared_ptr<ChunkedArray>* out) {
BEGIN_PARQUET_CATCH_EXCEPTIONS
diff --git a/cpp/src/parquet/arrow/reader.h b/cpp/src/parquet/arrow/reader.h
index 2cbd36176f..6e46ca43f7 100644
--- a/cpp/src/parquet/arrow/reader.h
+++ b/cpp/src/parquet/arrow/reader.h
@@ -141,26 +141,19 @@ class PARQUET_EXPORT FileReader {
/// \brief Read column as a whole into a chunked array.
///
- /// The indicated column index is relative to the schema
+ /// The index i refers the index of the top level schema field, which may
+ /// be nested or flat - e.g.
+ ///
+ /// 0 foo.bar
+ /// foo.bar.baz
+ /// foo.qux
+ /// 1 foo2
+ /// 2 foo3
+ ///
+ /// i=0 will read the entire foo struct, i=1 the foo2 primitive column etc
virtual ::arrow::Status ReadColumn(int i,
std::shared_ptr<::arrow::ChunkedArray>* out) = 0;
- // NOTE: Experimental API
- // Reads a specific top level schema field into an Array
- // The index i refers the index of the top level schema field, which may
- // be nested or flat - e.g.
- //
- // 0 foo.bar
- // foo.bar.baz
- // foo.qux
- // 1 foo2
- // 2 foo3
- //
- // i=0 will read the entire foo struct, i=1 the foo2 primitive column etc
- ARROW_DEPRECATED("Deprecated in 9.0.0. Use ReadColumn instead.")
- virtual ::arrow::Status ReadSchemaField(
- int i, std::shared_ptr<::arrow::ChunkedArray>* out) = 0;
-
/// \brief Return a RecordBatchReader of all row groups and columns.
virtual ::arrow::Status GetRecordBatchReader(
std::unique_ptr<::arrow::RecordBatchReader>* out) = 0;