36enum class ICEBERG_EXPORT FileFormatType {
44ICEBERG_EXPORT
inline std::string_view
ToString(FileFormatType format_type) {
45 switch (format_type) {
46 case FileFormatType::kParquet:
48 case FileFormatType::kAvro:
50 case FileFormatType::kOrc:
52 case FileFormatType::kPuffin:
60 std::string_view str)
noexcept {
62 if (lower ==
"parquet")
return FileFormatType::kParquet;
63 if (lower ==
"avro")
return FileFormatType::kAvro;
64 if (lower ==
"orc")
return FileFormatType::kOrc;
65 if (lower ==
"puffin")
return FileFormatType::kPuffin;
66 return InvalidArgument(
"Invalid file format type: {}", str);
static std::string ToLower(std::string_view str)
Lower-case a UTF-8 string using Unicode simple (1:1) case mapping.
Definition expected.h:1199
Define symbol visibility macros for core Iceberg APIs.
Core Apache Iceberg C++ APIs.
Definition arrow_io_util.h:34
ICEBERG_EXPORT std::string_view ToString(Expression::Operation op)
Returns a string representation of an expression operation.
void unreachable() noexcept
Marks a branch the program can never take.
Definition unreachable.h:35
ICEBERG_EXPORT Result< FileFormatType > FileFormatTypeFromString(std::string_view str) noexcept
Convert a string to a FileFormatType.
Definition file_format.h:59
Define Result, Status, and error helpers.
Provide string utility helpers.
Portable stand-in for std::unreachable.