Package org.apache.drill.exec.util

Examples of org.apache.drill.exec.util.JsonStringArrayList


    public int getCount(int index) {
      return offsets.getAccessor().get(index+1) - offsets.getAccessor().get(index);
    }
   
    public List<Float> getObject(int index) {
      List<Float> vals = new JsonStringArrayList();
      int start = offsets.getAccessor().get(index) - sliceOffset;
      int end = offsets.getAccessor().get(index+1) - sliceOffset;
      for(int i = start; i < end; i++){
        vals.add(values.getAccessor().getObject(i));
      }
      return vals;
    }
View Full Code Here


  public class RepeatedListAccessor implements RepeatedAccessor{

    @Override
    public Object getObject(int index) {
      List<Object> l = new JsonStringArrayList();
      int end = offsets.getAccessor().get(index+1);
      for(int i =  offsets.getAccessor().get(index); i < end; i++){
        l.add(vector.getAccessor().getObject(i));
      }
      return l;
    }
View Full Code Here

    public int getCount(int index) {
      return offsets.getAccessor().get(index+1) - offsets.getAccessor().get(index);
    }
   
    public List<Period> getObject(int index) {
      List<Period> vals = new JsonStringArrayList();
      int start = offsets.getAccessor().get(index) - sliceOffset;
      int end = offsets.getAccessor().get(index+1) - sliceOffset;
      for(int i = start; i < end; i++){
        vals.add(values.getAccessor().getObject(i));
      }
      return vals;
    }
View Full Code Here

  public class RepeatedMapAccessor implements RepeatedAccessor {

    @Override
    public Object getObject(int index) {
      List<Object> l = new JsonStringArrayList();
      int end = offsets.getAccessor().get(index+1);
      for(int i =  offsets.getAccessor().get(index); i < end; i++){
        Map<String, Object> vv = Maps.newLinkedHashMap();
        for(Map.Entry<String, ValueVector> e : vectors.entrySet()){
          ValueVector v = e.getValue();
          String k = e.getKey();
          Object value =  v.getAccessor().getObject(i);
          if(value != null){
            vv.put(k,value);
          }
        }
        l.add(vv);
      }
      return l;
    }
View Full Code Here

    public int getCount(int index) {
      return offsets.getAccessor().get(index+1) - offsets.getAccessor().get(index);
    }
   
    public List<BigDecimal> getObject(int index) {
      List<BigDecimal> vals = new JsonStringArrayList();
      int start = offsets.getAccessor().get(index) - sliceOffset;
      int end = offsets.getAccessor().get(index+1) - sliceOffset;
      for(int i = start; i < end; i++){
        vals.add(values.getAccessor().getObject(i));
      }
      return vals;
    }
View Full Code Here

    public int getCount(int index) {
      return offsets.getAccessor().get(index+1) - offsets.getAccessor().get(index);
    }
   
    public List<Boolean> getObject(int index) {
      List<Boolean> vals = new JsonStringArrayList();
      int start = offsets.getAccessor().get(index) - sliceOffset;
      int end = offsets.getAccessor().get(index+1) - sliceOffset;
      for(int i = start; i < end; i++){
        vals.add(values.getAccessor().getObject(i));
      }
      return vals;
    }
View Full Code Here

  public class RepeatedMapAccessor implements RepeatedAccessor {

    @Override
    public Object getObject(int index) {
      List<Object> l = new JsonStringArrayList();
      int end = offsets.getAccessor().get(index+1);
      for (int i =  offsets.getAccessor().get(index); i < end; i++) {
        Map<String, Object> vv = Maps.newLinkedHashMap();
        for (Map.Entry<String, ValueVector> e : vectors.entrySet()) {
          ValueVector v = e.getValue();
          String k = e.getKey();
          Object value =  v.getAccessor().getObject(i);
          if (value != null) {
            vv.put(k,value);
          }
        }
        l.add(vv);
      }
      return l;
    }
View Full Code Here

  public class RepeatedListAccessor implements RepeatedAccessor{

    @Override
    public Object getObject(int index) {
      List<Object> l = new JsonStringArrayList();
      int end = offsets.getAccessor().get(index+1);
      for (int i =  offsets.getAccessor().get(index); i < end; i++) {
        l.add(vector.getAccessor().getObject(i));
      }
      return l;
    }
View Full Code Here

  public class RepeatedListAccessor implements RepeatedAccessor{

    @Override
    public Object getObject(int index) {
      List<Object> l = new JsonStringArrayList();
      int end = offsets.getAccessor().get(index+1);
      for(int i =  offsets.getAccessor().get(index); i < end; i++){
        l.add(vector.getAccessor().getObject(i));
      }
      return l;
    }
View Full Code Here

  public class RepeatedMapAccessor implements RepeatedAccessor {

    @Override
    public Object getObject(int index) {
      List<Object> l = new JsonStringArrayList();
      int end = offsets.getAccessor().get(index+1);
      for(int i =  offsets.getAccessor().get(index); i < end; i++){
        Map<String, Object> vv = Maps.newLinkedHashMap();
        for(Map.Entry<String, ValueVector> e : vectors.entrySet()){
          ValueVector v = e.getValue();
          String k = e.getKey();
          Object value =  v.getAccessor().getObject(i);
          if(value != null){
            vv.put(k,value);
          }
        }
        l.add(vv);
      }
      return l;
    }
View Full Code Here

TOP

Related Classes of org.apache.drill.exec.util.JsonStringArrayList

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.