28#include "iceberg/iceberg_export.h"
29#include "iceberg/result.h"
30#include "iceberg/util/string_util.h"
35enum class ICEBERG_EXPORT FileFormatType {
43ICEBERG_EXPORT
inline std::string_view ToString(FileFormatType format_type) {
44 switch (format_type) {
45 case FileFormatType::kParquet:
47 case FileFormatType::kAvro:
49 case FileFormatType::kOrc:
51 case FileFormatType::kPuffin:
59 std::string_view str)
noexcept {
60 auto lower = StringUtils::ToLower(str);
61 if (lower ==
"parquet")
return FileFormatType::kParquet;
62 if (lower ==
"avro")
return FileFormatType::kAvro;
63 if (lower ==
"orc")
return FileFormatType::kOrc;
64 if (lower ==
"puffin")
return FileFormatType::kPuffin;
65 return InvalidArgument(
"Invalid file format type: {}", str);