Skip to content
Merged
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
3 changes: 3 additions & 0 deletions src/iceberg/json_internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include "iceberg/util/formatter.h" // IWYU pragma: keep
#include "iceberg/util/macros.h"
#include "iceberg/util/timepoint.h"
#include "iceberg/util/unreachable.h"

namespace iceberg {

Expand Down Expand Up @@ -477,6 +478,8 @@ nlohmann::json ToJson(const Type& type) {
case TypeId::kUuid:
return "uuid";
}
internal::Unreachable(
std::format("Unknown type id: {}", static_cast<int>(type.type_id())));
}

nlohmann::json ToJson(const Schema& schema) {
Expand Down
3 changes: 3 additions & 0 deletions src/iceberg/schema_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "iceberg/util/checked_cast.h"
#include "iceberg/util/formatter_internal.h"
#include "iceberg/util/macros.h"
#include "iceberg/util/unreachable.h"

namespace iceberg {

Expand Down Expand Up @@ -172,6 +173,8 @@ std::string_view ToString(FieldProjection::Kind kind) {
case FieldProjection::Kind::kNull:
return "null";
}
internal::Unreachable(
std::format("Unknown field projection kind: {}", static_cast<int>(kind)));
}

std::string ToString(const FieldProjection& projection) {
Expand Down
5 changes: 5 additions & 0 deletions src/iceberg/transform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include "iceberg/transform_function.h"
#include "iceberg/type.h"
#include "iceberg/util/unreachable.h"

namespace iceberg {
namespace {
Expand Down Expand Up @@ -59,6 +60,8 @@ constexpr std::string_view TransformTypeToString(TransformType type) {
case TransformType::kVoid:
return kVoidName;
}
internal::Unreachable(
std::format("Unknown transform type: {}", static_cast<int>(type)));
}

std::shared_ptr<Transform> Transform::Identity() {
Expand Down Expand Up @@ -166,6 +169,8 @@ std::string Transform::ToString() const {
return std::format("{}[{}]", TransformTypeToString(transform_type_),
std::get<int32_t>(param_));
}
internal::Unreachable(
std::format("Unknown transform type: {}", static_cast<int>(transform_type_)));
}

TransformFunction::TransformFunction(TransformType transform_type,
Expand Down
Loading