private void assertArrayOfStructsEquals(String expected, ASTNode tree) {
    ASTNode queryNode = (ASTNode) tree.getChild(0);
    ASTNode insertNode = (ASTNode) queryNode.getChild(0);
    ASTNode selectNode = (ASTNode) insertNode.getChild(1);
    ASTNode selectExprNode = (ASTNode) selectNode.getChild(0);
    ASTNode inlineFuncNode = (ASTNode) selectExprNode.getChild(0);
    ASTNode arrayFuncNode = (ASTNode) inlineFuncNode.getChild(1);

    assertEquals(expected, arrayFuncNode.dump());
  }
Test cases for parse WITHIN GROUP clause syntax.
function(expression) WITHIN GROUP (ORDER BY sort_expression)
parser/src/test/org/apache/hadoop/hive/ql/parse/TestValuesClause.java