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/iceberg-cpp.git
The following commit(s) were added to refs/heads/main by this push:
new c61344f3 chore: replace Status::OK in comments with more appropriate
words (#487)
c61344f3 is described below
commit c61344f3b58f21c834bd2d85a852940257a1ddf7
Author: Junwang Zhao <[email protected]>
AuthorDate: Mon Jan 5 09:49:23 2026 +0800
chore: replace Status::OK in comments with more appropriate words (#487)
Replace Status::OK with more appropriate words since we don't actually have
Status::OK.
---
src/iceberg/avro/avro_direct_decoder_internal.h | 2 +-
src/iceberg/avro/avro_direct_encoder_internal.h | 2 +-
src/iceberg/catalog.h | 6 +++---
src/iceberg/catalog/memory/in_memory_catalog.cc | 10 +++++-----
src/iceberg/util/error_collector.h | 4 ++--
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/iceberg/avro/avro_direct_decoder_internal.h
b/src/iceberg/avro/avro_direct_decoder_internal.h
index 9344117f..d067b550 100644
--- a/src/iceberg/avro/avro_direct_decoder_internal.h
+++ b/src/iceberg/avro/avro_direct_decoder_internal.h
@@ -59,7 +59,7 @@ struct DecodeContext {
/// \param metadata_context The metadata column context for populating them
/// \param array_builder The Arrow array builder to append decoded data to
/// \param ctx Decode context for reusing scratch buffers
-/// \return Status::OK if successful, or an error status
+/// \return Status indicating success, or an error status
Status DecodeAvroToBuilder(const ::avro::NodePtr& avro_node, ::avro::Decoder&
decoder,
const SchemaProjection& projection,
const Schema& projected_schema,
diff --git a/src/iceberg/avro/avro_direct_encoder_internal.h
b/src/iceberg/avro/avro_direct_encoder_internal.h
index 314c1faa..2a3a4428 100644
--- a/src/iceberg/avro/avro_direct_encoder_internal.h
+++ b/src/iceberg/avro/avro_direct_encoder_internal.h
@@ -51,7 +51,7 @@ struct EncodeContext {
/// \param array The Arrow array containing the data to encode
/// \param row_index The index of the row to encode within the array
/// \param ctx Encode context for reusing scratch buffers
-/// \return Status::OK if successful, or an error status
+/// \return Status indicating success, or an error status
Status EncodeArrowToAvro(const ::avro::NodePtr& avro_node, ::avro::Encoder&
encoder,
const Type& type, const ::arrow::Array& array,
int64_t row_index,
EncodeContext& ctx);
diff --git a/src/iceberg/catalog.h b/src/iceberg/catalog.h
index 7be56bae..81c9ddd1 100644
--- a/src/iceberg/catalog.h
+++ b/src/iceberg/catalog.h
@@ -47,7 +47,7 @@ class ICEBERG_EXPORT Catalog {
///
/// \param ns the namespace to create
/// \param properties a key-value map of metadata for the namespace
- /// \return Status::OK if created successfully;
+ /// \return Status indicating success if created successfully;
/// ErrorKind::kAlreadyExists if the namespace already exists;
/// ErrorKind::kNotSupported if the operation is not supported
virtual Status CreateNamespace(
@@ -72,7 +72,7 @@ class ICEBERG_EXPORT Catalog {
/// \brief Drop a namespace.
///
/// \param ns the namespace to drop
- /// \return Status::OK if dropped successfully;
+ /// \return Status indicating success if dropped successfully;
/// ErrorKind::kNoSuchNamespace if the namespace does not exist;
/// ErrorKind::kNotAllowed if the namespace is not empty
virtual Status DropNamespace(const Namespace& ns) = 0;
@@ -88,7 +88,7 @@ class ICEBERG_EXPORT Catalog {
/// \param ns the namespace to update
/// \param updates a set of properties to add or overwrite
/// \param removals a set of property keys to remove
- /// \return Status::OK if the update is successful;
+ /// \return Status indicating success if the update is successful;
/// ErrorKind::kNoSuchNamespace if the namespace does not exist;
/// ErrorKind::kUnsupported if the operation is not supported
virtual Status UpdateNamespaceProperties(
diff --git a/src/iceberg/catalog/memory/in_memory_catalog.cc
b/src/iceberg/catalog/memory/in_memory_catalog.cc
index 5e562765..25b0064c 100644
--- a/src/iceberg/catalog/memory/in_memory_catalog.cc
+++ b/src/iceberg/catalog/memory/in_memory_catalog.cc
@@ -58,7 +58,7 @@ class ICEBERG_EXPORT InMemoryNamespace {
///
/// \param namespace_ident The namespace to create.
/// \param properties A map of key-value pairs to associate with the
namespace.
- /// \return Status::OK if the namespace is created;
+ /// \return Status indicating success if the namespace is created;
/// ErrorKind::kAlreadyExists if the namespace already exists.
Status CreateNamespace(const Namespace& namespace_ident,
const std::unordered_map<std::string, std::string>&
properties);
@@ -66,7 +66,7 @@ class ICEBERG_EXPORT InMemoryNamespace {
/// \brief Deletes an existing namespace.
///
/// \param namespace_ident The namespace to delete.
- /// \return Status::OK if the namespace is deleted;
+ /// \return Status indicating success if the namespace is deleted;
/// ErrorKind::kNoSuchNamespace if the namespace does not exist;
/// ErrorKind::kNotAllowed if the namespace is not empty.
Status DropNamespace(const Namespace& namespace_ident);
@@ -84,7 +84,7 @@ class ICEBERG_EXPORT InMemoryNamespace {
/// \param namespace_ident The namespace to update.
/// \param updates Properties to add or overwrite.
/// \param removals Property keys to remove.
- /// \return Status::OK if the update is successful;
+ /// \return Status indicating success if the update is successful;
/// ErrorKind::kNoSuchNamespace if the namespace does not exist;
/// ErrorKind::kUnsupported if the operation is not supported.
Status UpdateNamespaceProperties(
@@ -102,7 +102,7 @@ class ICEBERG_EXPORT InMemoryNamespace {
///
/// \param table_ident The fully qualified identifier of the table.
/// \param metadata_location The path to the table's metadata.
- /// \return Status::OK if the table is registered;
+ /// \return Status indicating success if the table is registered;
/// Error otherwise.
Status RegisterTable(const TableIdentifier& table_ident,
const std::string& metadata_location);
@@ -110,7 +110,7 @@ class ICEBERG_EXPORT InMemoryNamespace {
/// \brief Unregisters a table from the specified namespace.
///
/// \param table_ident The identifier of the table to unregister.
- /// \return Status::OK if the table is removed;
+ /// \return Status indicating success if the table is removed;
/// ErrorKind::kNoSuchTable if the table does not exist.
Status UnregisterTable(const TableIdentifier& table_ident);
diff --git a/src/iceberg/util/error_collector.h
b/src/iceberg/util/error_collector.h
index a08665e8..5eb055a9 100644
--- a/src/iceberg/util/error_collector.h
+++ b/src/iceberg/util/error_collector.h
@@ -148,8 +148,8 @@ class ICEBERG_EXPORT ErrorCollector {
/// in Build(), Apply(), or Commit() methods) to validate that no errors
/// were accumulated during the builder method calls.
///
- /// \return Status::OK if no errors, or a ValidationFailed error with
- /// all accumulated error messages
+ /// \return Status indicating success if no errors, or a ValidationFailed
+ /// error with all accumulated error messages
[[nodiscard]] Status CheckErrors() const {
if (!errors_.empty()) {
std::string error_msg = "Validation failed due to the following
errors:\n";