Package org.apache.drill.exec.expr.holders

Examples of org.apache.drill.exec.expr.holders.RepeatedMapHolder


  public void start(){
    if(ok()){
      // update the repeated vector to state that there is current+1 objects.
     
      RepeatedMapHolder h = new RepeatedMapHolder();
      container.getAccessor().get(idx(), h);
      if(h.start >= h.end){
        container.getMutator().startNewGroup(idx())
      }
      currentChildIndex = container.getMutator().add(idx());
View Full Code Here


    return maxOffset - currentOffset;
  }

  public void setPosition(int index){
    super.setPosition(index);
    RepeatedMapHolder h = new RepeatedMapHolder();
    vector.getAccessor().get(index, h);
    if(h.start == h.end){
      currentOffset = NO_VALUES;
    }else{
      currentOffset = h.start-1;
View Full Code Here

    }
  }

  public void setSinglePosition(int index, int childIndex){
    super.setPosition(index);
    RepeatedMapHolder h = new RepeatedMapHolder();
    vector.getAccessor().get(index, h);
    if(h.start == h.end){
      currentOffset = NO_VALUES;
    }else{
      int singleOffset = h.start + childIndex;
View Full Code Here

  public void start(){
    if(ok()){
      // update the repeated vector to state that there is current+1 objects.
     
      RepeatedMapHolder h = new RepeatedMapHolder();
      container.getAccessor().get(idx(), h);
      if(h.start >= h.end){
        container.getMutator().startNewGroup(idx())
      }
      currentChildIndex = container.getMutator().add(idx());
View Full Code Here

      return to;
    }

    @Override
    public boolean copyValueSafe(int from, int to) {
      RepeatedMapHolder holder = new RepeatedMapHolder();
      accessor.get(from, holder);
      int newIndex = this.to.offsets.getAccessor().get(to);
      //todo: make these bulk copies
      for(int i = holder.start; i < holder.end; i++, newIndex++){
        for(TransferPair p : pairs){
View Full Code Here

      reader.setPosition(index);
      holder.reader = reader;
    }

    public void get(int index, int arrayIndex, ComplexHolder holder){
      RepeatedMapHolder h = new RepeatedMapHolder();
      get(index, h);
      int offset = h.start + arrayIndex;

      if(offset >= h.end){
        holder.reader = NullReader.INSTANCE;
View Full Code Here

    if(ok()){
      checkValueCapacity();
      if (!ok()) return;
      // update the repeated vector to state that there is current+1 objects.
     
      RepeatedMapHolder h = new RepeatedMapHolder();
      container.getAccessor().get(idx(), h);
      if(h.start >= h.end){
        container.getMutator().startNewGroup(idx())
      }
      currentChildIndex = container.getMutator().add(idx());
View Full Code Here

      return to;
    }

    @Override
    public boolean copyValueSafe(int srcIndex, int destIndex) {
      RepeatedMapHolder holder = new RepeatedMapHolder();
      accessor.get(srcIndex, holder);
      int newIndex = to.offsets.getAccessor().get(destIndex);
      //todo: make these bulk copies
      for (int i = holder.start; i < holder.end; i++, newIndex++) {
        for (TransferPair p : pairs) {
View Full Code Here

      reader.setPosition(index);
      holder.reader = reader;
    }

    public void get(int index, int arrayIndex, ComplexHolder holder) {
      RepeatedMapHolder h = new RepeatedMapHolder();
      get(index, h);
      int offset = h.start + arrayIndex;

      if (offset >= h.end) {
        holder.reader = NullReader.INSTANCE;
View Full Code Here

  }

  @Override
  public void setPosition(int index) {
    super.setPosition(index);
    RepeatedMapHolder h = new RepeatedMapHolder();
    vector.getAccessor().get(index, h);
    if (h.start == h.end) {
      currentOffset = NO_VALUES;
    } else {
      currentOffset = h.start-1;
View Full Code Here

TOP

Related Classes of org.apache.drill.exec.expr.holders.RepeatedMapHolder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.