Examples of VarCharHolder


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

    assertTrue(ByteFunctionHelpers.compare(left.buffer.memoryAddress(), left.start, left.end, right.buffer.memoryAddress(), right.start, right.end) == 0);
  }

  @Test
  public void testEqualLong(){
    VarCharHolder left = helloLong;
    VarCharHolder right = helloLong;
    assertTrue(ByteFunctionHelpers.equal(left.buffer.memoryAddress(), left.start, left.end, right.buffer.memoryAddress(), right.start, right.end) == 1);
  }
View Full Code Here

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

    assertTrue(ByteFunctionHelpers.equal(left.buffer.memoryAddress(), left.start, left.end, right.buffer.memoryAddress(), right.start, right.end) == 1);
  }

  @Test
  public void testNotEqualLong(){
    VarCharHolder left = helloLong;
    VarCharHolder right = goodbyeLong;
    assertTrue(ByteFunctionHelpers.equal(left.buffer.memoryAddress(), left.start, left.end, right.buffer.memoryAddress(), right.start, right.end) == 0);
  }
View Full Code Here

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

    vh.end = b.length;
    return vh;
  }

  private void handleString(JsonParser parser, MapWriter writer, String fieldName) throws IOException {
    VarCharHolder vh = new VarCharHolder();
    writer.varChar(fieldName).write(prepareVarCharHolder(vh, parser.getText()));
  }
View Full Code Here

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

    VarCharHolder vh = new VarCharHolder();
    writer.varChar(fieldName).write(prepareVarCharHolder(vh, parser.getText()));
  }

  private void handleString(JsonParser parser, ListWriter writer) throws IOException {
    VarCharHolder vh = new VarCharHolder();
    writer.varChar().write(prepareVarCharHolder(vh, parser.getText()));
  }
View Full Code Here

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

    VarCharHolder vh = new VarCharHolder();
    writer.varChar().write(prepareVarCharHolder(vh, parser.getText()));
  }

  private void handleString(String value, ListWriter writer) throws IOException {
    VarCharHolder vh = new VarCharHolder();
    writer.varChar().write(prepareVarCharHolder(vh, parser.getText()));
  }
View Full Code Here

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

        BitHolder bitHolder = new BitHolder();
        bitHolder.value = (fieldReader.readBoolean() == true) ? 1 : 0;
        mapWriter.bit(MappifyUtility.fieldValue).write(bitHolder);
        break;
      case VARCHAR:
        VarCharHolder vh1 = new VarCharHolder();
        byte[] b = fieldReader.readText().toString().getBytes(Charsets.UTF_8);
        buffer.reallocIfNeeded(b.length);
        buffer.setBytes(0, b);
        vh1.start = 0;
        vh1.end = b.length;
View Full Code Here

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

public class ValueHolderHelper {
  static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ValueHolderHelper.class);

  public static VarCharHolder getVarCharHolder(DrillBuf buf, String s){
    VarCharHolder vch = new VarCharHolder();

    byte[] b = s.getBytes(Charsets.UTF_8);
    vch.start = 0;
    vch.end = b.length;
    vch.buffer = buf.reallocIfNeeded(b.length);
View Full Code Here

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

    vch.buffer.setBytes(0, b);
    return vch;
  }

  public static VarCharHolder getVarCharHolder(BufferAllocator a, String s){
    VarCharHolder vch = new VarCharHolder();

    byte[] b = s.getBytes(Charsets.UTF_8);
    vch.start = 0;
    vch.end = b.length;
    vch.buffer = a.buffer(b.length); //
View Full Code Here

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

    vh.end = b.length;
    return vh;
  }

  private void handleString(JsonParser parser, MapWriter writer, String fieldName) throws IOException {
    VarCharHolder vh = new VarCharHolder();
    writer.varChar(fieldName).write(prepareVarCharHolder(vh, parser.getText()));
  }
View Full Code Here

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

    VarCharHolder vh = new VarCharHolder();
    writer.varChar(fieldName).write(prepareVarCharHolder(vh, parser.getText()));
  }

  private void handleString(JsonParser parser, ListWriter writer) throws IOException {
    VarCharHolder vh = new VarCharHolder();
    writer.varChar().write(prepareVarCharHolder(vh, parser.getText()));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.