apache/beam · error · java.lang.UnsupportedOperationException
SideInputTable is a read-only metadata adapter and does not…
Error message
SideInputTable is a read-only metadata adapter and does not support partitionStatisticsFiles.
What it means
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.
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.
Example fix
// before List<PartitionStatisticsFile> pstats = sideInputTable.partitionStatisticsFiles(); // after List<PartitionStatisticsFile> pstats = catalog.loadTable(identifier).partitionStatisticsFiles();
Defensive patterns
Strategy: type-guard
Type guard
boolean hasPartitionStats = !(table instanceof SideInputTable);
Try / catch
try {
List<PartitionStatisticsFile> pstats = table.partitionStatisticsFiles();
} catch (UnsupportedOperationException e) {
if (!e.getMessage().contains("partitionStatisticsFiles")) throw e;
// fall back to serialized partition spec metadata
} Prevention
- 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.
When it happens
Trigger: Calling table.partitionStatisticsFiles() on a SideInputTable, typically during partition pruning or planning inside a worker.
Common situations: Partition-pruning utilities applied uniformly to all Table implementations; reuse of planner code on side inputs.
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
- SideInputTable is a read-only metadata adapter and does not…
- SideInputTable is a read-only metadata adapter and does not…
- SideInputTable is a read-only metadata adapter and does not…
- SideInputTable is a read-only metadata adapter and does not…
- SideInputTable is a read-only metadata adapter and does not…
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/de10f0241206d4b3.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/SideInputTable.java:219
throw new UnsupportedOperationException(
"SideInputTable is a read-only metadata adapter and does not support snapshots.");
}
@Override
public Map<String, SnapshotRef> refs() {
throw new UnsupportedOperationException(
"SideInputTable is a read-only metadata adapter and does not support snapshot refs.");
}
@Override
public List<StatisticsFile> statisticsFiles() {
throw new UnsupportedOperationException(
"SideInputTable is a read-only metadata adapter and does not support statisticsFiles.");
}
@Override
public List<PartitionStatisticsFile> partitionStatisticsFiles() {
throw new UnsupportedOperationException(
"SideInputTable is a read-only metadata adapter and does not support partitionStatisticsFiles.");
}
@Override
public TableScan newScan() {
throw new UnsupportedOperationException(
"SideInputTable is a read-only metadata adapter and does not support scans directly.");
}
@Override
public IncrementalAppendScan newIncrementalAppendScan() {
throw new UnsupportedOperationException(
"SideInputTable is a read-only metadata adapter and does not support scans directly.");
}
@Override
public IncrementalChangelogScan newIncrementalChangelogScan() {
throw new UnsupportedOperationException(View on GitHub (pinned to 12126d8942)