public static void validateSkewedColNames(List<String> colNames, List<String> skewedColNames)
      throws SemanticException {
    // make a copy
    List<String> copySkewedColNames = new ArrayList<String>(skewedColNames);
    // remove valid columns
    copySkewedColNames.removeAll(colNames);
    if (copySkewedColNames.size() > 0) {
      StringBuilder invalidColNames = new StringBuilder();
      for (String name : copySkewedColNames) {
        invalidColNames.append(name);
        invalidColNames.append(" ");
      }
      throw new SemanticException(
          ErrorMsg.SKEWED_TABLE_INVALID_COLUMN.getMsg(invalidColNames.toString()));
    }
  }
Skewed column name should be a valid column defined.

@param colNames
@param skewedColNames
@throws SemanticException
ql/src/java/org/apache/hadoop/hive/ql/plan/ValidationUtility.java