{"record":{"id":"5dc75c910e2321c0","repo":"apache/iceberg","slug":"snowflakecatalog-does-not-currently-support-remove","errorCode":null,"errorMessage":"SnowflakeCatalog does not currently support removeProperties","messagePattern":"SnowflakeCatalog does not currently support removeProperties","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"snowflake/src/main/java/org/apache/iceberg/snowflake/SnowflakeCatalog.java","lineNumber":238,"sourceCode":"          \"Namespace '%s' with snowflake identifier '%s' doesn't exist\", namespace, id);\n    }\n  }\n\n  @Override\n  public boolean dropNamespace(Namespace namespace) {\n    throw new UnsupportedOperationException(\n        \"SnowflakeCatalog does not currently support dropNamespace\");\n  }\n\n  @Override\n  public boolean setProperties(Namespace namespace, Map<String, String> properties) {\n    throw new UnsupportedOperationException(\n        \"SnowflakeCatalog does not currently support setProperties\");\n  }\n\n  @Override\n  public boolean removeProperties(Namespace namespace, Set<String> properties) {\n    throw new UnsupportedOperationException(\n        \"SnowflakeCatalog does not currently support removeProperties\");\n  }\n\n  @Override\n  protected TableOperations newTableOps(TableIdentifier tableIdentifier) {\n    String fileIOImpl = DEFAULT_FILE_IO_IMPL;\n    if (catalogProperties.containsKey(CatalogProperties.FILE_IO_IMPL)) {\n      fileIOImpl = catalogProperties.get(CatalogProperties.FILE_IO_IMPL);\n    }\n\n    // Initialize a fresh FileIO for each TableOperations created, because some FileIO\n    // implementations such as S3FileIO can become bound to a single S3 bucket. Additionally,\n    // FileIO implementations often support only a finite set of one or more URI schemes (i.e.\n    // S3FileIO only supports s3/s3a/s3n, and even ResolvingFileIO only supports the combination\n    // of schemes registered for S3FileIO and HadoopFileIO). Individual catalogs may need to\n    // support tables across different cloud/storage providers with disjoint FileIO implementations.\n    FileIO fileIO = fileIOFactory.newFileIO(fileIOImpl, catalogProperties, conf);\n    closeableGroup.addCloseable(fileIO);","sourceCodeStart":220,"sourceCodeEnd":256,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/snowflake/src/main/java/org/apache/iceberg/snowflake/SnowflakeCatalog.java#L220-L256","documentation":"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.","triggerScenarios":"Calling catalog.removeProperties(namespace, keys) (directly or via Spark/Flink ALTER NAMESPACE ... UNSET PROPERTIES) on a SnowflakeCatalog.","commonSituations":"Generic catalog-maintenance scripts that unset properties across all catalogs; cleanup jobs after migrating namespaces from another catalog to Snowflake.","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."],"exampleFix":"// before\nfor (Catalog c : catalogs) { c.removeProperties(ns, keys); }\n// after\nfor (Catalog c : catalogs) {\n  if (c instanceof SnowflakeCatalog) continue;\n  ((SupportsNamespaces) c).removeProperties(ns, keys);\n}","handlingStrategy":"validation","validationCode":"if (catalog instanceof SnowflakeCatalog && !keys.isEmpty()) {\n  LOG.warn(\"Skipping removeProperties on SnowflakeCatalog (unsupported)\");\n  return;\n}","typeGuard":"boolean canUnsetNamespaceProps = !(catalog instanceof SnowflakeCatalog);","tryCatchPattern":"try { catalog.removeProperties(ns, keys); } catch (UnsupportedOperationException e) { LOG.warn(\"Namespace property removal unsupported here\", e); }","preventionTips":["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"],"tags":["unsupported-operation","snowflake-catalog","namespace-properties"],"backgroundTag":"unsupported-operation","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}