本文整理了Java中org.apache.parquet.io.api.Binary.fromReusedByteBuffer()
方法的一些代码示例,展示了Binary.fromReusedByteBuffer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binary.fromReusedByteBuffer()
方法的具体详情如下:
包路径:org.apache.parquet.io.api.Binary
类名称:Binary
方法名:fromReusedByteBuffer
暂无
代码示例来源:origin: org.lasersonlab.apache.parquet/parquet-column
private static Binary convert(ByteBuffer buffer) {
return Binary.fromReusedByteBuffer(buffer);
}
代码示例来源:origin: org.apache.parquet/parquet-column
@Deprecated
/**
* @deprecated Use @link{fromReusedByteBuffer} or @link{fromConstantByteBuffer} instead
*/
public static Binary fromByteBuffer(final ByteBuffer value) {
return fromReusedByteBuffer(value); // Assume producer intends to reuse byte[]
}
代码示例来源:origin: org.lasersonlab.apache.parquet/parquet-column
@Deprecated
/**
* @deprecated Use @link{fromReusedByteBuffer} or @link{fromConstantByteBuffer} instead
*/
public static Binary fromByteBuffer(final ByteBuffer value) {
return fromReusedByteBuffer(value); // Assume producer intends to reuse byte[]
}
代码示例来源:origin: Netflix/iceberg
@Override
public void write(int repetitionLevel, ByteBuffer buffer) {
column.writeBinary(repetitionLevel, Binary.fromReusedByteBuffer(buffer));
}
}
代码示例来源:origin: Netflix/iceberg
@SuppressWarnings("unchecked")
private static <C extends Comparable<C>> C getParquetPrimitive(Literal<?> lit) {
if (lit == null) {
return null;
}
// TODO: this needs to convert to handle BigDecimal and UUID
Object value = lit.value();
if (value instanceof Number) {
return (C) lit.value();
} else if (value instanceof CharSequence) {
return (C) Binary.fromString(value.toString());
} else if (value instanceof ByteBuffer) {
return (C) Binary.fromReusedByteBuffer((ByteBuffer) value);
}
throw new UnsupportedOperationException(
"Type not supported yet: " + value.getClass().getName());
}
代码示例来源:origin: org.apache.drill.exec/drill-java-exec
@Override
public void writeValue(RecordConsumer consumer, DrillBuf buffer, int start, int end, int precision) {
consumer.addBinary(Binary.fromReusedByteBuffer(buffer.nioBuffer(start, end - start)));
}
}
代码示例来源:origin: org.apache.parquet/parquet-avro
recordConsumer.addBinary(Binary.fromReusedByteArray((byte[]) value));
} else {
recordConsumer.addBinary(Binary.fromReusedByteBuffer((ByteBuffer) value));
内容来源于网络,如有侵权,请联系作者删除!