示例#1
0
文件: RexUtil.java 项目: kunlqt/optiq
 /**
  * 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;
 }
示例#2
0
文件: RexUtil.java 项目: kunlqt/optiq
 public Void visitLocalRef(RexLocalRef inputRef) {
   super.visitLocalRef(inputRef);
   if (inputRef.getIndex() >= limit) {
     throw new IllegalForwardRefException();
   }
   return null;
 }