public static List<List<String>> analyzeDDLSkewedValues(ASTNode node) throws SemanticException {
    ASTNode child = (ASTNode) node.getChild(1);
    if (child == null) {
      throw new SemanticException(ErrorMsg.SKEWED_TABLE_NO_COLUMN_VALUE.getMsg());
    }

    List<List<String>> skewedValues = new ArrayList<>();
    switch (child.getToken().getType()) {
    case HiveParser.TOK_TABCOLVALUE:
      for (String skewedValue : getSkewedValueFromASTNode(child)) {
        skewedValues.add(Arrays.asList(skewedValue));
      }
      break;
    case HiveParser.TOK_TABCOLVALUE_PAIR:
      for (Node cvNode : child.getChildren()) {
        ASTNode acvNode = (ASTNode) cvNode;
        if (acvNode.getToken().getType() != HiveParser.TOK_TABCOLVALUES) {
          throw new SemanticException(ErrorMsg.SKEWED_TABLE_NO_COLUMN_VALUE.getMsg());
        } else {
          skewedValues.add(getSkewedValuesFromASTNode(acvNode));
        }
      }
      break;
    default:
      break;
    }

    return skewedValues;
  }
Utilities for skewed table related DDL.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/skewed/SkewedTableUtils.java