Exemple #1
0
 /**
  * Converts an array of {@link RexNode} to an array of {@link Integer}. Every node must be a
  * {@link RexLocalRef}.
  */
 public static Integer[] toOrdinalArray(RexNode[] rexNodes) {
   Integer[] orderKeys = new Integer[rexNodes.length];
   for (int i = 0; i < orderKeys.length; i++) {
     RexLocalRef inputRef = (RexLocalRef) rexNodes[i];
     orderKeys[i] = inputRef.getIndex();
   }
   return orderKeys;
 }
Exemple #2
0
 public Void visitLocalRef(RexLocalRef inputRef) {
   super.visitLocalRef(inputRef);
   if (inputRef.getIndex() >= limit) {
     throw new IllegalForwardRefException();
   }
   return null;
 }