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

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


      a1 = c1.getAccessor();

      int count = 0;
      for(int i = 0; i < c1.getAccessor().getValueCount(); i++){
        if (!a1.isNull(i)) {
          NullableVarBinaryHolder holder = new NullableVarBinaryHolder();
          a1.get(i, holder);
          assertEquals("aa", holder.toString());
          ++count;
        }
      }
      assertEquals(50, count);
    }
View Full Code Here


      a1 = c1.getAccessor();

      int count = 0;
      for(int i = 0; i < c1.getAccessor().getValueCount(); i++){
        if (!a1.isNull(i)) {
          NullableVarBinaryHolder holder = new NullableVarBinaryHolder();
          a1.get(i, holder);
          assertEquals("aa", holder.toString());
          ++count;
        }
      }
      assertEquals(50, count);
    }
View Full Code Here

      a1 = c1.getAccessor();

      int count = 0;
      for(int i = 0; i < c1.getAccessor().getValueCount(); i++){
        if (!a1.isNull(i)) {
          NullableVarBinaryHolder holder = new NullableVarBinaryHolder();
          a1.get(i, holder);
          assertEquals("aa", StringFunctionHelpers.toStringFromUTF8(holder.start,  holder.end,  holder.buffer));
          ++count;
        }
      }
View Full Code Here

        return false;
      }

      if (usingDictionary) {
        DrillBuf b = DrillBuf.wrapByteBuffer(currDictValToWrite.toByteBuffer());
        NullableVarBinaryHolder holder = new NullableVarBinaryHolder();
        holder.buffer=b;
        holder.start=0;
        holder.end=currDictValToWrite.length();
        holder.isSet=1;
        success = nullableVarBinaryVector.getMutator().setSafe(index, holder);
      }
      else {
        NullableVarBinaryHolder holder = new NullableVarBinaryHolder();
        holder.buffer=value;
        holder.start=start;
        holder.end=start+length;
        holder.isSet=1;
        success = nullableVarBinaryVector.getMutator().setSafe(index, holder);
View Full Code Here

      boolean success;
      if(index >= nullableVarBinaryVector.getValueCapacity()) return false;

      if (usingDictionary) {
        DrillBuf b = DrillBuf.wrapByteBuffer(currDictValToWrite.toByteBuffer());
        NullableVarBinaryHolder holder = new NullableVarBinaryHolder();
        holder.buffer=b;
        holder.start=0;
        holder.end=currDictValToWrite.length();
        holder.isSet=1;
        success = nullableVarBinaryVector.getMutator().setSafe(index, holder);
      }
      else {
        NullableVarBinaryHolder holder = new NullableVarBinaryHolder();
        holder.buffer=value;
        holder.start=start;
        holder.end=start+length;
        holder.isSet=1;
        success = nullableVarBinaryVector.getMutator().setSafe(index, holder);
View Full Code Here

TOP

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

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.