apache/iceberg · error · UnsupportedOperationException
SnowflakeCatalog does not currently support removeProperties
Error message
SnowflakeCatalog does not currently support removeProperties
What it means
SnowflakeCatalog explicitly refuses namespace property removal. The SupportsNamespaces.removeProperties contract is unimplemented because Snowflake namespaces cannot hold Iceberg-managed properties, so the method always throws UnsupportedOperationException. There is no input that makes this succeed.
Source
Thrown at snowflake/src/main/java/org/apache/iceberg/snowflake/SnowflakeCatalog.java:238
"Namespace '%s' with snowflake identifier '%s' doesn't exist", namespace, id);
}
}
@Override
public boolean dropNamespace(Namespace namespace) {
throw new UnsupportedOperationException(
"SnowflakeCatalog does not currently support dropNamespace");
}
@Override
public boolean setProperties(Namespace namespace, Map<String, String> properties) {
throw new UnsupportedOperationException(
"SnowflakeCatalog does not currently support setProperties");
}
@Override
public boolean removeProperties(Namespace namespace, Set<String> properties) {
throw new UnsupportedOperationException(
"SnowflakeCatalog does not currently support removeProperties");
}
@Override
protected TableOperations newTableOps(TableIdentifier tableIdentifier) {
String fileIOImpl = DEFAULT_FILE_IO_IMPL;
if (catalogProperties.containsKey(CatalogProperties.FILE_IO_IMPL)) {
fileIOImpl = catalogProperties.get(CatalogProperties.FILE_IO_IMPL);
}
// Initialize a fresh FileIO for each TableOperations created, because some FileIO
// implementations such as S3FileIO can become bound to a single S3 bucket. Additionally,
// FileIO implementations often support only a finite set of one or more URI schemes (i.e.
// S3FileIO only supports s3/s3a/s3n, and even ResolvingFileIO only supports the combination
// of schemes registered for S3FileIO and HadoopFileIO). Individual catalogs may need to
// support tables across different cloud/storage providers with disjoint FileIO implementations.
FileIO fileIO = fileIOFactory.newFileIO(fileIOImpl, catalogProperties, conf);
closeableGroup.addCloseable(fileIO);View on GitHub (pinned to 86d9c8fc54)
Solutions
- Skip property removal on SnowflakeCatalog; namespace properties from prior catalogs cannot be represented there anyway.
- Feature-detect before calling: guard against SnowflakeCatalog or use a catalog that implements SupportsNamespaces mutations.
- If properties were set in a previous catalog, accept they do not carry over; re-encode needed metadata elsewhere.
- Contribute or request removeProperties support upstream if this is blocking.
Example fix
// before
for (Catalog c : catalogs) { c.removeProperties(ns, keys); }
// after
for (Catalog c : catalogs) {
if (c instanceof SnowflakeCatalog) continue;
((SupportsNamespaces) c).removeProperties(ns, keys);
} Defensive patterns
Strategy: validation
Validate before calling
if (catalog instanceof SnowflakeCatalog && !keys.isEmpty()) {
LOG.warn("Skipping removeProperties on SnowflakeCatalog (unsupported)");
return;
} Type guard
boolean canUnsetNamespaceProps = !(catalog instanceof SnowflakeCatalog);
Try / catch
try { catalog.removeProperties(ns, keys); } catch (UnsupportedOperationException e) { LOG.warn("Namespace property removal unsupported here", e); } Prevention
- Skip UNSET PROPERTIES statements for Snowflake catalogs in maintenance scripts
- Treat Snowflake namespace properties as nonexistent by design
- Detect capability once at startup and record it in catalog metadata
When it happens
Trigger: Calling catalog.removeProperties(namespace, keys) (directly or via Spark/Flink ALTER NAMESPACE ... UNSET PROPERTIES) on a SnowflakeCatalog.
Common situations: Generic catalog-maintenance scripts that unset properties across all catalogs; cleanup jobs after migrating namespaces from another catalog to Snowflake.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- SnowflakeCatalog does not currently support setProperties
- SnowflakeCatalog does not currently support defaultWarehouse
- %s doesn't implement copyWithStats
- %s doesn't implement validateFilesExist
- Can't retrieve values from an empty struct
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/5dc75c910e2321c0.
Report an issue: GitHub.