{"record":{"id":"0a1cee99b3b450f9","repo":"apache/beam","slug":"sideinputtable-is-a-read-only-metadata-adapter-and-does-not","errorCode":null,"errorMessage":"SideInputTable is a read-only metadata adapter and does not support refresh.","messagePattern":"SideInputTable is a read-only metadata adapter and does not support refresh\\.","errorType":"exception","errorClass":"java.lang.UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/SideInputTable.java","lineNumber":177,"sourceCode":"\n  @Override\n  public LocationProvider locationProvider() {\n    return locationProvider;\n  }\n\n  @Override\n  public FileIO io() {\n    return spec.getFileIO();\n  }\n\n  @Override\n  public EncryptionManager encryption() {\n    return encryptionManager;\n  }\n\n  @Override\n  public void refresh() {\n    throw new UnsupportedOperationException(\n        \"SideInputTable is a read-only metadata adapter and does not support refresh.\");\n  }\n\n  @Override\n  public Snapshot currentSnapshot() {\n    throw new UnsupportedOperationException(\n        \"SideInputTable is a read-only metadata adapter and does not support snapshots.\");\n  }\n\n  @Override\n  public Snapshot snapshot(long snapshotId) {\n    throw new UnsupportedOperationException(\n        \"SideInputTable is a read-only metadata adapter and does not support snapshots.\");\n  }\n\n  @Override\n  public Iterable<Snapshot> snapshots() {\n    throw new UnsupportedOperationException(","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/SideInputTable.java#L159-L195","documentation":"SideInputTable is a lightweight, read-only adapter carrying serialized Iceberg table metadata into a Beam side input. It intentionally does not contact a catalog or file system, so refresh() is unsupported and throws UnsupportedOperationException. Refreshing is only meaningful on a live table backed by a catalog.","triggerScenarios":"Calling table.refresh() on a SideInputTable instance inside a DoFn or transform where the table was deserialized from a SerializableTableSpec.","commonSituations":"Generic code written against the Iceberg Table interface that calls refresh() unconditionally; moving code that worked with catalog-loaded tables to side-input tables; combining Beam Iceberg IO with custom scanning logic.","solutions":["Remove the refresh() call when working with SideInputTable; metadata is fixed at pipeline construction time.","If fresh metadata is needed, re-load the table from the catalog outside the pipeline (or in setup) and rebuild the side input.","Guard with instanceof SideInputTable before calling mutation/lifecycle methods."],"exampleFix":"// before\ntable.refresh();\n\n// after\nif (!(table instanceof SideInputTable)) {\n  table.refresh();\n}","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"boolean supportsRefresh = !(table instanceof SideInputTable);","tryCatchPattern":"try {\n  table.refresh();\n} catch (UnsupportedOperationException e) {\n  if (!e.getMessage().contains(\"does not support refresh\")) throw e;\n  // no-op: side input metadata is fixed\n}","preventionTips":["Treat SideInputTable as immutable; never call lifecycle methods on it.","Refresh only catalog-loaded tables at pipeline construction time.","Check instanceof SideInputTable in shared code that operates on arbitrary Table instances."],"tags":["java","iceberg","beam","unsupported-operation"],"backgroundTag":"unsupported-operation","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}