{"record":{"id":"3e18a0a54e70bf05","repo":"apache/beam","slug":"readonlytableprovider-does-not-support-table-deletion","errorCode":null,"errorMessage":"ReadOnlyTableProvider does not support table deletion","messagePattern":"ReadOnlyTableProvider does not support table deletion","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/ReadOnlyTableProvider.java","lineNumber":54,"sourceCode":"  public ReadOnlyTableProvider(String typeName, Map<String, BeamSqlTable> tables) {\n    this.typeName = typeName;\n    this.tables = tables;\n  }\n\n  @Override\n  public String getTableType() {\n    return typeName;\n  }\n\n  @Override\n  public void createTable(Table table) {\n    throw new UnsupportedOperationException(\n        \"ReadOnlyTableProvider does not support table creation\");\n  }\n\n  @Override\n  public void dropTable(String tableName) {\n    throw new UnsupportedOperationException(\n        \"ReadOnlyTableProvider does not support table deletion\");\n  }\n\n  @Override\n  public Map<String, Table> getTables() {\n    ImmutableMap.Builder<String, Table> map = ImmutableMap.builder();\n    for (Map.Entry<String, BeamSqlTable> table : tables.entrySet()) {\n      map.put(\n          table.getKey(),\n          Table.builder()\n              .type(getTableType())\n              .name(table.getKey())\n              .schema(Schema.builder().build())\n              .build());\n    }\n    return map.build();\n  }\n","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/ReadOnlyTableProvider.java#L36-L72","documentation":"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.","triggerScenarios":"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.","commonSituations":"See trigger scenarios.","solutions":["Do not issue DROP TABLE against read-only providers.","If table removal is required, use a writable provider that supports lifecycle operations."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}