@Test
  public void testParseTrim() throws Exception {
    ASTNode tree = parseDriver.parseSelect(
        "select trim('f' from 'foo  bar')", null).getTree();

    assertTrimFunction(tree, "trim", "'foo  bar'", "'f'");
  }
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/TestParseTrim.java