org.apache.parquet.io.api.Binary.fromByteBuffer()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(96)

本文整理了Java中org.apache.parquet.io.api.Binary.fromByteBuffer()方法的一些代码示例,展示了Binary.fromByteBuffer()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binary.fromByteBuffer()方法的具体详情如下:
包路径:org.apache.parquet.io.api.Binary
类名称:Binary
方法名:fromByteBuffer

Binary.fromByteBuffer介绍

暂无

代码示例

代码示例来源:origin: apache/hive

public Binary toBinary() {
 ByteBuffer buf = ByteBuffer.allocate(12);
 buf.order(ByteOrder.LITTLE_ENDIAN);
 buf.putLong(timeOfDayNanos);
 buf.putInt(julianDay);
 buf.flip();
 return Binary.fromByteBuffer(buf);
}

代码示例来源:origin: dremio/dremio-oss

@Override
public void writeValue() throws IOException {
     reader.read(holder);
 ArrowBuf buf = holder.buffer;
 consumer.addBinary(Binary.fromByteBuffer(holder.buffer.nioBuffer(holder.start, holder.end - holder.start)));
}

代码示例来源:origin: dremio/dremio-oss

@Override
public void writeValue() throws IOException {
     reader.read(holder);
 ArrowBuf buf = holder.buffer;
 consumer.addBinary(Binary.fromByteBuffer(holder.buffer.nioBuffer(holder.start, holder.end - holder.start)));
}

代码示例来源:origin: org.apache.drill.exec/drill-java-exec

@Override
 public void writeField() throws IOException {
  reader.read(holder);
  consumer.startField(fieldName, fieldId);
  consumer.addBinary(Binary.fromByteBuffer(holder.buffer.nioBuffer(holder.start, holder.end - holder.start)));
  consumer.endField(fieldName, fieldId);
 }
}

代码示例来源:origin: org.apache.drill.exec/drill-java-exec

@Override
 public void writeField() throws IOException {
  reader.read(holder);
  consumer.startField(fieldName, fieldId);
  consumer.addBinary(Binary.fromByteBuffer(holder.buffer.nioBuffer(holder.start, holder.end - holder.start)));
  consumer.endField(fieldName, fieldId);
 }
}

代码示例来源:origin: org.apache.drill.exec/drill-java-exec

@Override
 public void writeField() throws IOException {
  reader.read(holder);
  consumer.startField(fieldName, fieldId);
  consumer.addBinary(Binary.fromByteBuffer(holder.buffer.nioBuffer(holder.start, holder.end - holder.start)));
  consumer.endField(fieldName, fieldId);
 }
}

代码示例来源:origin: org.apache.drill.exec/drill-java-exec

@Override
 public void writeField() throws IOException {
  if (!reader.isSet()) {
   return;
  }
  reader.read(holder);
  consumer.startField(fieldName, fieldId);
  consumer.addBinary(Binary.fromByteBuffer(holder.buffer.nioBuffer(holder.start, holder.end - holder.start)));
  consumer.endField(fieldName, fieldId);
 }
}

代码示例来源:origin: org.apache.drill.exec/drill-java-exec

@Override
 public void writeField() throws IOException {
  if (!reader.isSet()) {
   return;
  }
  reader.read(holder);
  consumer.startField(fieldName, fieldId);
  consumer.addBinary(Binary.fromByteBuffer(holder.buffer.nioBuffer(holder.start, holder.end - holder.start)));
  consumer.endField(fieldName, fieldId);
 }
}

代码示例来源:origin: org.apache.drill.exec/drill-java-exec

@Override
 public void writeField() throws IOException {
  if (!reader.isSet()) {
   return;
  }
  reader.read(holder);
  consumer.startField(fieldName, fieldId);
  consumer.addBinary(Binary.fromByteBuffer(holder.buffer.nioBuffer(holder.start, holder.end - holder.start)));
  consumer.endField(fieldName, fieldId);
 }
}

代码示例来源:origin: org.apache.drill.exec/drill-java-exec

@Override
 public void writeField() throws IOException {
 // empty lists are represented by simply not starting a field, rather than starting one and putting in 0 elements
 if (reader.size() == 0) {
  return;
 }
 consumer.startField(fieldName, fieldId);
 for (int i = 0; i < reader.size(); i++) {
  reader.read(i, holder);
  consumer.addBinary(Binary.fromByteBuffer(holder.buffer.nioBuffer(holder.start, holder.end - holder.start)));
 }
 consumer.endField(fieldName, fieldId);
 }
}

代码示例来源:origin: org.apache.drill.exec/drill-java-exec

@Override
 public void writeField() throws IOException {
 // empty lists are represented by simply not starting a field, rather than starting one and putting in 0 elements
 if (reader.size() == 0) {
  return;
 }
 consumer.startField(fieldName, fieldId);
 for (int i = 0; i < reader.size(); i++) {
  reader.read(i, holder);
  consumer.addBinary(Binary.fromByteBuffer(holder.buffer.nioBuffer(holder.start, holder.end - holder.start)));
 }
 consumer.endField(fieldName, fieldId);
 }
}

代码示例来源:origin: org.apache.drill.exec/drill-java-exec

@Override
 public void writeField() throws IOException {
 // empty lists are represented by simply not starting a field, rather than starting one and putting in 0 elements
 if (reader.size() == 0) {
  return;
 }
 consumer.startField(fieldName, fieldId);
 for (int i = 0; i < reader.size(); i++) {
  reader.read(i, holder);
  consumer.addBinary(Binary.fromByteBuffer(holder.buffer.nioBuffer(holder.start, holder.end - holder.start)));
 }
 consumer.endField(fieldName, fieldId);
 }
}

相关文章