/** * Return child's serialization IDs. Usually, 0 is used for a child id of unary node or left child of * binary node. 1 is used for right child of binary node. Between will use 0 as predicand, 1 as begin, and 2 as * end eval node. For more detail, you should refer to each EvalNode implementation. * * @param context Context * @param evalNode EvalNode * @return The array of IDs which points to stored EvalNode. * @see org.apache.tajo.plan.expr.EvalNode */ private int [] registerGetChildIds(EvalTreeProtoBuilderContext context, EvalNode evalNode) { int [] childIds = new int[evalNode.childNum()]; for (int i = 0; i < evalNode.childNum(); i++) { if (context.idMap.containsKey(evalNode.getChild(i))) { childIds[i] = context.idMap.get(evalNode.getChild(i)); } else { childIds[i] = context.seqId++; } } return childIds; }
/** * Return child's serialization IDs. Usually, 0 is used for a child id of unary node or left child of * binary node. 1 is used for right child of binary node. Between will use 0 as predicand, 1 as begin, and 2 as * end eval node. For more detail, you should refer to each EvalNode implementation. * * @param context Context * @param evalNode EvalNode * @return The array of IDs which points to stored EvalNode. * @see org.apache.tajo.plan.expr.EvalNode */ private int [] registerGetChildIds(EvalTreeProtoBuilderContext context, EvalNode evalNode) { int [] childIds = new int[evalNode.childNum()]; for (int i = 0; i < evalNode.childNum(); i++) { if (context.idMap.containsKey(evalNode.getChild(i))) { childIds[i] = context.idMap.get(evalNode.getChild(i)); } else { childIds[i] = context.seqId++; } } return childIds; }
public EvalNode bind(@Nullable EvalContext evalContext, Schema schema) { for (int i = 0; i < childNum(); i++) { getChild(i).bind(evalContext, schema); } isBound = true; return this; }
public EvalNode bind(@Nullable EvalContext evalContext, Schema schema) { for (int i = 0; i < childNum(); i++) { getChild(i).bind(evalContext, schema); } isBound = true; return this; }