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

    assertTrimFunction(tree, "rtrim", "'foo  bar'", "'fo'");
  }
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