Skip to content

Commit 4763614

Browse files
committed
chore: address warning on windows platform
Signed-off-by: Junwang Zhao <[email protected]>
1 parent 41e4d82 commit 4763614

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/iceberg/file_format.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
#include "iceberg/iceberg_export.h"
2828
#include "iceberg/result.h"
29+
#include "iceberg/util/unreachable.h"
2930

3031
namespace iceberg {
3132

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

5457
/// \brief Convert a string to a FileFormatType

src/iceberg/manifest_list.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "iceberg/result.h"
3131
#include "iceberg/schema_field.h"
3232
#include "iceberg/type.h"
33+
#include "iceberg/util/unreachable.h"
3334

3435
namespace iceberg {
3536

@@ -221,6 +222,8 @@ ICEBERG_EXPORT constexpr std::string_view ToString(ManifestFile::Content type) n
221222
case ManifestFile::Content::kDeletes:
222223
return "deletes";
223224
}
225+
internal::Unreachable(
226+
std::format("Unknown manifest content type: {}", static_cast<int>(type)));
224227
}
225228

226229
/// \brief Get the relative manifest content type from name

src/iceberg/snapshot.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "iceberg/iceberg_export.h"
2929
#include "iceberg/result.h"
3030
#include "iceberg/util/timepoint.h"
31+
#include "iceberg/util/unreachable.h"
3132

3233
namespace iceberg {
3334

@@ -50,6 +51,8 @@ ICEBERG_EXPORT constexpr std::string_view SnapshotRefTypeToString(
5051
case SnapshotRefType::kTag:
5152
return "tag";
5253
}
54+
internal::Unreachable(
55+
std::format("Invalid snapshot reference type: {}", static_cast<int>(type)));
5356
}
5457
/// \brief Get the relative snapshot reference type from name
5558
ICEBERG_EXPORT constexpr Result<SnapshotRefType> SnapshotRefTypeFromString(

0 commit comments

Comments
 (0)