public String[] filterCommands(String[] commands) throws IOException {
    if (!useSharedDatabase) {
      for (int i=0; i<commands.length; i++) {
        if (USE_PATTERN.matcher(commands[i]).matches()) {
          System.err.println(String.format(USE_COMMAND_WARNING, inputFile, commands[i]));
        }
        commands[i] = replaceTableNames(commands[i]);
      }
    }
    return commands;
  }
Filters the sql commands if necessary - eg. not using the shared database.
@param commands The array of the sql commands before filtering
@return The filtered array of the sql command strings
@throws IOException File read error
itests/util/src/main/java/org/apache/hive/beeline/QFile.java