diff --git a/src/iceberg/catalog/rest/rest_catalog.cc b/src/iceberg/catalog/rest/rest_catalog.cc index eeffffd26..e6c1c972d 100644 --- a/src/iceberg/catalog/rest/rest_catalog.cc +++ b/src/iceberg/catalog/rest/rest_catalog.cc @@ -152,7 +152,6 @@ Result> RestCatalog::ListNamespaces(const Namespace& ns) } next_token = list_response.next_page_token; } - return result; } Status RestCatalog::CreateNamespace( diff --git a/src/iceberg/metrics_config.cc b/src/iceberg/metrics_config.cc index 499a425d6..f78cadf2b 100644 --- a/src/iceberg/metrics_config.cc +++ b/src/iceberg/metrics_config.cc @@ -36,8 +36,8 @@ Status MetricsConfig::VerifyReferencedColumns( } auto field_name = std::string_view(key).substr(TableProperties::kMetricModeColumnConfPrefix.size()); - auto field = schema.FindFieldByName(field_name); - if (!field.has_value() || !field.value().has_value()) { + ICEBERG_ASSIGN_OR_RAISE(auto field, schema.FindFieldByName(field_name)); + if (!field.has_value()) { return ValidationFailed( "Invalid metrics config, could not find column {} from table prop {} in " "schema {}",