apache/beam · error · UnsupportedOperationException

ReadOnlyTableProvider does not support table deletion

Error message

ReadOnlyTableProvider does not support table deletion

What it means

dropTable on ReadOnlyTableProvider is an unconditional guard: since the provider's tables are an immutable, pre-populated map with no removal capability, any DROP TABLE against it throws UnsupportedOperationException.

Solutions

  1. Do not issue DROP TABLE against read-only providers.
  2. If table removal is required, use a writable provider that supports lifecycle operations.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/ReadOnlyTableProvider.java:54 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/3e18a0a54e70bf05. Report an issue: GitHub.

Appendix: source

Thrown at sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/ReadOnlyTableProvider.java:54

  public ReadOnlyTableProvider(String typeName, Map<String, BeamSqlTable> tables) {
    this.typeName = typeName;
    this.tables = tables;
  }

  @Override
  public String getTableType() {
    return typeName;
  }

  @Override
  public void createTable(Table table) {
    throw new UnsupportedOperationException(
        "ReadOnlyTableProvider does not support table creation");
  }

  @Override
  public void dropTable(String tableName) {
    throw new UnsupportedOperationException(
        "ReadOnlyTableProvider does not support table deletion");
  }

  @Override
  public Map<String, Table> getTables() {
    ImmutableMap.Builder<String, Table> map = ImmutableMap.builder();
    for (Map.Entry<String, BeamSqlTable> table : tables.entrySet()) {
      map.put(
          table.getKey(),
          Table.builder()
              .type(getTableType())
              .name(table.getKey())
              .schema(Schema.builder().build())
              .build());
    }
    return map.build();
  }

View on GitHub (pinned to 12126d8942)