{"record":{"id":"de10f0241206d4b3","repo":"apache/beam","slug":"sideinputtable-is-a-read-only-metadata-adapter-and-does-not-de10f0","errorCode":null,"errorMessage":"SideInputTable is a read-only metadata adapter and does not support partitionStatisticsFiles.","messagePattern":"SideInputTable is a read-only metadata adapter and does not support partitionStatisticsFiles\\.","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":219,"sourceCode":"    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(\n        \"SideInputTable is a read-only metadata adapter and does not support scans directly.\");\n  }\n\n  @Override\n  public IncrementalAppendScan newIncrementalAppendScan() {\n    throw new UnsupportedOperationException(\n        \"SideInputTable is a read-only metadata adapter and does not support scans directly.\");\n  }\n\n  @Override\n  public IncrementalChangelogScan newIncrementalChangelogScan() {\n    throw new UnsupportedOperationException(","sourceCodeStart":201,"sourceCodeEnd":237,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/SideInputTable.java#L201-L237","documentation":"SideInputTable.partitionStatisticsFiles() throws UnsupportedOperationException because partition statistics files are not carried in the read-only side-input metadata. Accessing them requires a live catalog table.","triggerScenarios":"Calling table.partitionStatisticsFiles() on a SideInputTable, typically during partition pruning or planning inside a worker.","commonSituations":"Partition-pruning utilities applied uniformly to all Table implementations; reuse of planner code on side inputs.","solutions":["Rely on the serialized partitioning metadata in the spec instead of partition statistics.","Load the real table from the catalog if partition statistics are mandatory.","Condition partition-statistics logic on the table not being a SideInputTable."],"exampleFix":"// before\nList<PartitionStatisticsFile> pstats = sideInputTable.partitionStatisticsFiles();\n\n// after\nList<PartitionStatisticsFile> pstats = catalog.loadTable(identifier).partitionStatisticsFiles();","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"boolean hasPartitionStats = !(table instanceof SideInputTable);","tryCatchPattern":"try {\n  List<PartitionStatisticsFile> pstats = table.partitionStatisticsFiles();\n} catch (UnsupportedOperationException e) {\n  if (!e.getMessage().contains(\"partitionStatisticsFiles\")) throw e;\n  // fall back to serialized partition spec metadata\n}","preventionTips":["Perform partition pruning with the partition spec in the serialized metadata, not statistics files.","Load partition statistics only from catalog-backed tables.","Branch planner code on the concrete table type."],"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"}