302451 {
302453 if (compression == "none" || compression == "auto") {
302454 input = "auto";
302455 } else {
302456 auto compression_type = EnumUtil::FromString<CompressionType>(compression);
302457 if (compression_type == CompressionType::COMPRESSION_CONSTANT ||
302458 compression_type == CompressionType::COMPRESSION_EMPTY) {
302459 throw ParserException("auto / constant cannot be used for force_compression");
302460 }
302462 if (!compression_availability_result.IsAvailable()) {
302463 if (compression_availability_result.IsDeprecated()) {
302464 throw ParserException("Attempted to force a deprecated compression type (%s)",
302465 CompressionTypeToString(compression_type));
302466 } else {
302467 throw ParserException("Attempted to force a compression type that isn't available yet (%s)",
302468 CompressionTypeToString(compression_type));
302469 }
302470 }
302471 }
302472}
static DUCKDB_API string Lower(const string &str)
Convert a string to lowercase.
Definition duckdb.cpp:109630
DUCKDB_API string ToString() const
Convert this value to a string.
Definition duckdb.cpp:133318
CompressionAvailabilityResult CompressionTypeIsAvailable(CompressionType compression_type, optional_ptr< StorageManager > storage_manager)
Definition duckdb.cpp:67573