private static RegexFilterSet getPortableFilterSet() {
    RegexFilterSet filterSet = new RegexFilterSet();
    String regex = "PREHOOK: query:\\s+%s[\\n\\s]+.*?(?=(PREHOOK: query:|$))";
    for (String command : COMMANDS_TO_REMOVE) {
      filterSet.addFilter(String.format(regex, command),
          Pattern.DOTALL | Pattern.CASE_INSENSITIVE, "");
    }
    filterSet.addFilter("(Warning: )(.* Join .*JOIN\\[\\d+\\].*)( is a cross product)", "$1MASKED$3");
    filterSet.addFilter("mapreduce.jobtracker.address=.*\n",
        "mapreduce.jobtracker.address=MASKED\n");
    return filterSet;
  }
If the test.beeline.compare.portable system property is true,
the commands, listed in the COMMANDS_TO_REMOVE array will be removed
from the out files before comparison.
@return The regex filters to apply to remove the commands from the out files.
itests/util/src/main/java/org/apache/hive/beeline/QFile.java