{"record":{"id":"6bc685a4766a37b4","repo":"apache/beam","slug":"sideinputtable-is-a-read-only-metadata-adapter-and-does-not-6bc685","errorCode":null,"errorMessage":"SideInputTable is a read-only metadata adapter and does not support snapshot refs.","messagePattern":"SideInputTable is a read-only metadata adapter and does not support snapshot refs\\.","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":207,"sourceCode":"    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(\n        \"SideInputTable is a read-only metadata adapter and does not support snapshots.\");\n  }\n\n  @Override\n  public List<HistoryEntry> history() {\n    throw new UnsupportedOperationException(\n        \"SideInputTable is a read-only metadata adapter and does not support snapshots.\");\n  }\n\n  @Override\n  public Map<String, SnapshotRef> refs() {\n    throw new UnsupportedOperationException(\n        \"SideInputTable is a read-only metadata adapter and does not support snapshot refs.\");\n  }\n\n  @Override\n  public List<StatisticsFile> statisticsFiles() {\n    throw new UnsupportedOperationException(\n        \"SideInputTable is a read-only metadata adapter and does not support statisticsFiles.\");\n  }\n\n  @Override\n  public List<PartitionStatisticsFile> partitionStatisticsFiles() {\n    throw new UnsupportedOperationException(\n        \"SideInputTable is a read-only metadata adapter and does not support partitionStatisticsFiles.\");\n  }\n\n  @Override\n  public TableScan newScan() {\n    throw new UnsupportedOperationException(","sourceCodeStart":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/SideInputTable.java#L189-L225","documentation":"SideInputTable.refs() throws UnsupportedOperationException because branch/tag snapshot references are not part of the serialized metadata shipped into the side input. Resolving refs requires live catalog metadata.","triggerScenarios":"Calling table.refs() on a SideInputTable, e.g. code that resolves which branch or tag to read from at runtime in a worker.","commonSituations":"Branch-aware read logic executing inside a DoFn; utilities that enumerate refs for validation.","solutions":["Resolve the ref (branch/tag) at pipeline construction time from the catalog, then build the side input from that snapshot.","Load the real table from the catalog if refs must be queried.","Guard refs-related calls with an instanceof SideInputTable check."],"exampleFix":"// before\nMap<String, SnapshotRef> refs = sideInputTable.refs();\n\n// after\nMap<String, SnapshotRef> refs = catalog.loadTable(identifier).refs();","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"boolean supportsRefs = !(table instanceof SideInputTable);","tryCatchPattern":"try {\n  Map<String, SnapshotRef> refs = table.refs();\n} catch (UnsupportedOperationException e) {\n  if (!e.getMessage().contains(\"snapshot refs\")) throw e;\n  // resolve refs from catalog table\n}","preventionTips":["Resolve branches/tags to concrete snapshot IDs at pipeline construction time.","Avoid branch-ref lookups inside Beam workers.","Centralize ref resolution in catalog-accessing code."],"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"}