protected boolean isPrefixedBy(PartitionSpec pSpec) {
      if ( pSpec == null || pSpec.getExpressions() == null) {
        return true;
      }

      int pExprCnt = pSpec.getExpressions().size();
      int exprCnt = getExpressions() == null ? 0 : getExpressions().size();

      if ( exprCnt < pExprCnt ) {
        return false;
      }

      for(int i=0; i < pExprCnt; i++) {
        if ( !pSpec.getExpressions().get(i).equals(getExpressions().get(i)) ) {
          return false;
        }
      }
      return true;
    }
Add order expressions from the list of expressions in the format of ASTNode
@param nodes
ql/src/java/org/apache/hadoop/hive/ql/parse/PTFInvocationSpec.java