@Test public void testQuery() { CommandResult cr = getShell().executeCommand(String.format("temp query --sql 'select * from %s'", tableName)); assertEquals(TempViewCommand.QUERY_SUCCESS, cr.getResult().toString()); }
@CliCommand(value = {"temp_query", "temp query"}, help = "query against created temp view") public String query( @CliOption(key = {"sql"}, mandatory = true, help = "select query to run against view") final String sql) { try { HoodieCLI.getTempViewProvider().runQuery(sql); return QUERY_SUCCESS; } catch (HoodieException ex) { return QUERY_FAIL; } }
TempViewCommand implements CommandMarker { @CliCommand(value = {"temp_query", "temp query"}, help = "query against created temp view") public String query( @CliOption(key = {"sql"}, mandatory = true, help = "select query to run against view") final String sql) { try { HoodieCLI.getTempViewProvider().runQuery(sql); return QUERY_SUCCESS; } catch (HoodieException ex) { return QUERY_FAIL; } } }
TempViewCommand implements CommandMarker { @CliCommand(value = {"temp_query", "temp query"}, help = "query against created temp view") public String query( @CliOption(key = {"sql"}, mandatory = true, help = "select query to run against view") final String sql) { try { HoodieCLI.getTempViewProvider().runQuery(sql); return QUERY_SUCCESS; } catch (HoodieException ex) { return QUERY_FAIL; } }  }
TempViewCommand implements CommandMarker { @CliCommand(value = {"temp_query", "temp query"}, help = "query against created temp view") public String query( @CliOption(key = {"sql"}, mandatory = true, help = "select query to run against view") final String sql) { try { HoodieCLI.getTempViewProvider().runQuery(sql); return QUERY_SUCCESS; } catch (HoodieException ex) { return QUERY_FAIL; } }  @CliCommand(value = {"temp_query", "temp query"}, help = "query against created temp view") String query(
          @CliOption(key = {"sql"}, mandatory = true, help = "select query to run against view") final String sql); @CliCommand(value = {"temps_show", "temps show"}, help = "Show all views name") String showAll(); @CliCommand(value = {"temp_delete", "temp delete"}, help = "Delete view name") String delete(
          @CliOption(key = {"view"}, mandatory = true, help = "view name") final String tableName); }
TempViewCommand implements CommandMarker { @CliCommand(value = {"temp_query", "temp query"}, help = "query against created temp view") public String query( @CliOption(key = {"sql"}, mandatory = true, help = "select query to run against view") final String sql) { try { HoodieCLI.getTempViewProvider().runQuery(sql); return QUERY_SUCCESS; } catch (HoodieException ex) { return QUERY_FAIL; } }  @CliCommand(value = {"temp_query", "temp query"}, help = "query against created temp view") String query(
          @CliOption(key = {"sql"}, mandatory = true, help = "select query to run against view") final String sql); @CliCommand(value = {"temps_show", "temps show"}, help = "Show all views name") String showAll(); @CliCommand(value = {"temp_delete", "temp delete"}, help = "Delete view name") String delete(
          @CliOption(key = {"view"}, mandatory = true, help = "view name") final String tableName); static final String QUERY_SUCCESS; static final String QUERY_FAIL; static final String SHOW_SUCCESS; }