示例#1
0
  @Override
  public Object clone() throws CloneNotSupportedException {
    WindowAggNode grp = (WindowAggNode) super.clone();
    if (partitionKeys != null) {
      grp.partitionKeys = new Column[partitionKeys.length];
      for (int i = 0; i < partitionKeys.length; i++) {
        grp.partitionKeys[i] = partitionKeys[i];
      }
    }

    if (windowFuncs != null) {
      grp.windowFuncs = new WindowFunctionEval[windowFuncs.length];
      for (int i = 0; i < windowFuncs.length; i++) {
        grp.windowFuncs[i] = (WindowFunctionEval) windowFuncs[i].clone();
      }
    }

    if (targets != null) {
      grp.targets = new ArrayList<>();
      for (Target t : targets) {
        grp.targets.add((Target) t.clone());
      }
    }

    return grp;
  }
示例#2
0
  @Override
  public LogicalNode visitWindowAgg(
      CompilationContext context,
      LogicalPlan plan,
      LogicalPlan.QueryBlock block,
      WindowAggNode node,
      Stack<LogicalNode> stack)
      throws TajoException {
    super.visitWindowAgg(context, plan, block, node, stack);

    compileProjectableNode(context, node.getInSchema(), node);

    return node;
  }