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
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_COMPILE_WARNING_AS_ERROR ON)

option(ICEBERG_BUILD_STATIC "Build static library" ON)
option(ICEBERG_BUILD_SHARED "Build shared library" OFF)
Expand Down
3 changes: 3 additions & 0 deletions src/iceberg/file_format.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include "iceberg/iceberg_export.h"
#include "iceberg/result.h"
#include "iceberg/util/unreachable.h"

namespace iceberg {

Expand All @@ -49,6 +50,8 @@ ICEBERG_EXPORT inline std::string_view ToString(FileFormatType format_type) {
case FileFormatType::kPuffin:
return "puffin";
}
internal::Unreachable(
std::format("Invalid file format type: {}", static_cast<int>(format_type)));
}

/// \brief Convert a string to a FileFormatType
Expand Down
3 changes: 3 additions & 0 deletions src/iceberg/manifest_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "iceberg/result.h"
#include "iceberg/schema_field.h"
#include "iceberg/type.h"
#include "iceberg/util/unreachable.h"

namespace iceberg {

Expand Down Expand Up @@ -221,6 +222,8 @@ ICEBERG_EXPORT constexpr std::string_view ToString(ManifestFile::Content type) n
case ManifestFile::Content::kDeletes:
return "deletes";
}
internal::Unreachable(
std::format("Unknown manifest content type: {}", static_cast<int>(type)));
}

/// \brief Get the relative manifest content type from name
Expand Down
3 changes: 3 additions & 0 deletions src/iceberg/snapshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "iceberg/iceberg_export.h"
#include "iceberg/result.h"
#include "iceberg/util/timepoint.h"
#include "iceberg/util/unreachable.h"

namespace iceberg {

Expand All @@ -50,6 +51,8 @@ ICEBERG_EXPORT constexpr std::string_view SnapshotRefTypeToString(
case SnapshotRefType::kTag:
return "tag";
}
internal::Unreachable(
std::format("Invalid snapshot reference type: {}", static_cast<int>(type)));
}
/// \brief Get the relative snapshot reference type from name
ICEBERG_EXPORT constexpr Result<SnapshotRefType> SnapshotRefTypeFromString(
Expand Down
Loading