The theory is that it throws an exception if file location in a catalog does not match catalog rules. But in some cases it can be safely ignored. Maybe, we can make it under a setting somehow.The code after the Exception may need to be rewritten thoughWhy do we need it? For multiple reasons:
Iceberg Catalog spec allows to "store" tables in different locations. In current ClickHouse implementation it is not possible.
S3 Tables are not compatible with CliclHouse for this reason as well, because S3 paths are different for them from what ClickHouse expects.
ICatalog.cpp
throw DB::Exception(DB::ErrorCodes::NOT_IMPLEMENTED, "Unexpected location format: {}", location_);