@Override
  public TableBuilder buildTable(TableIdentifier identifier, Schema schema) {
    return new ViewAwareTableBuilder(identifier, schema);
  }
@Test
  public void testCommitExceptionWithMessage() {
    TableIdentifier tableIdent = TableIdentifier.of("db", "tbl");
    BaseTable table = (BaseTable) catalog.buildTable(tableIdent, SCHEMA).create();
    TableOperations ops = table.operations();
    TableMetadata metadataV1 = ops.current();

    table.updateSchema().addColumn("n", Types.IntegerType.get()).commit();
    ops.refresh();

    try (MockedStatic<JdbcUtil> mockedStatic = Mockito.mockStatic(JdbcUtil.class)) {
      mockedStatic
          .when(() -> JdbcUtil.loadTable(any(), any(), any(), any()))
          .thenThrow(new SQLException("constraint failed"));
      assertThatThrownBy(() -> ops.commit(ops.current(), metadataV1))
          .isInstanceOf(AlreadyExistsException.class)
          .hasMessageStartingWith("Table already exists: " + tableIdent);
    }
  }