private Pattern[] toPattern(String[] patternStrs) {
    Pattern[] patterns = new Pattern[patternStrs.length];
    for (int i = 0; i < patternStrs.length; i++) {
      patterns[i] = Pattern.compile(patternStrs[i]);
    }
    return patterns;
  }
QOutProcessor: produces the final q.out from original q.out by postprocessing (e.g. masks)
itests/util/src/main/java/org/apache/hadoop/hive/ql/QOutProcessor.java