@Override
  public NonQueryResult executeNonQuery(ExecutionContext context, File sqlFile) throws ExecutorException {
    LOG.info("Sql file path: " + sqlFile.getPath());
    List<String> executedStmts;
    try {
      executedStmts = Files.lines(Paths.get(sqlFile.getPath())).collect(Collectors.toList());
    } catch (IOException e) {
      throw new ExecutorException(e);
    }
    LOG.info("Sql statements in Sql file: " + executedStmts.toString());

    List<String> submittedStmts = new ArrayList<>();
    List<String> nonSubmittedStmts = new ArrayList<>();
    validateExecutedStmts(executedStmts, submittedStmts, nonSubmittedStmts);
    if (submittedStmts.isEmpty()) {
      throw new ExecutorException("Nothing to execute. Note: SELECT statements are ignored.");
    }
    NonQueryResult result = executeNonQuery(context, submittedStmts);
    return new NonQueryResult(result.getExecutionId(), submittedStmts, nonSubmittedStmts);
  }
Samza implementation of Executor for Samza SQL Shell.
samza-sql-shell/src/main/java/org/apache/samza/sql/client/impl/SamzaExecutor.java