private void setupRankingArgs(WindowTableFunctionDef wdwTFnDef,
      WindowFunctionDef wFnDef,
      WindowFunctionSpec wSpec)
      throws SemanticException {
    if (wSpec.getArgs().size() > 0) {
      throw new SemanticException("Ranking Functions can take no arguments");
    }
    OrderDef oDef = wdwTFnDef.getOrder();
    List<OrderExpressionDef> oExprs = oDef.getExpressions();
    for (OrderExpressionDef oExpr : oExprs) {
      wFnDef.addArg(oExpr);
    }
  }
Collect order expressions for RANGE based windowing
@throws SemanticException
ql/src/java/org/apache/hadoop/hive/ql/parse/PTFTranslator.java