@ShellMethod(key = {"temp_delete", "temp delete"}, value = "Delete view name")
  public String delete(
      @ShellOption(value = {"--view"}, help = "view name") final String tableName) {

    try {
      HoodieCLI.getTempViewProvider().deleteTable(tableName);
      return String.format("Delete view %s successfully!", tableName);
    } catch (HoodieException ex) {
      return String.format("Delete view %s failed!", tableName);
    }
  }
@Test
  public void testDelete() {
    Object result = shell.evaluate(() -> String.format("temp delete --view %s", tableName));
    assertTrue(result.toString().endsWith("successfully!"));

    // after delete, we can not access table yet.
    assertThrows(HoodieException.class, () -> HoodieCLI.getTempViewProvider().runQuery("select * from " + tableName));
  }