本文整理了Java中org.apache.parquet.io.api.Binary.getBytesUnsafe()
方法的一些代码示例,展示了Binary.getBytesUnsafe()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binary.getBytesUnsafe()
方法的具体详情如下:
包路径:org.apache.parquet.io.api.Binary
类名称:Binary
方法名:getBytesUnsafe
[英]Variant of getBytes() that avoids copying backing data structure by returning backing byte[] of the Binary. Do not modify backing byte[] unless you know what you are doing.
[中]getBytes()的变体,通过返回二进制文件的备份字节[],避免复制备份数据结构。除非您知道自己在做什么,否则不要修改备份字节[]。
代码示例来源:origin: apache/hive
@Override
public byte[] readString(int id) {
return dict.decodeToBinary(id).getBytesUnsafe();
}
代码示例来源:origin: apache/hive
@Override
public byte[] readChar(int id) {
return dict.decodeToBinary(id).getBytesUnsafe();
}
代码示例来源:origin: apache/hive
@Override
public byte[] readDecimal() {
return valuesReader.readBytes().getBytesUnsafe();
}
代码示例来源:origin: apache/hive
@Override
public byte[] readDecimal(int id) {
return dict.decodeToBinary(id).getBytesUnsafe();
}
代码示例来源:origin: apache/hive
@Override
public byte[] readString() {
return valuesReader.readBytes().getBytesUnsafe();
}
代码示例来源:origin: apache/hive
@Override
public byte[] readVarchar(int id) {
return dict.decodeToBinary(id).getBytesUnsafe();
}
代码示例来源:origin: apache/hive
@Override
public byte[] readVarchar() {
// check the character numbers with the length
final byte[] value = valuesReader.readBytes().getBytesUnsafe();
return truncateIfNecesssary(value);
}
代码示例来源:origin: apache/hive
@Override
public byte[] readVarchar(int id) {
// check the character numbers with the length
final byte[] value = dict.decodeToBinary(id).getBytesUnsafe();
return truncateIfNecesssary(value);
}
代码示例来源:origin: apache/hive
@Override
public byte[] readChar() {
// check the character numbers with the length
final byte[] value = valuesReader.readBytes().getBytesUnsafe();
return truncateIfNecesssary(value);
}
代码示例来源:origin: apache/hive
@Override
public byte[] readDecimal(int id) {
hiveDecimalWritable.set(dict.decodeToBinary(id).getBytesUnsafe(), scale);
return super.validatedScaledDecimal(scale);
}
}
代码示例来源:origin: apache/hive
@Override
public byte[] readDecimal() {
hiveDecimalWritable.set(valuesReader.readBytes().getBytesUnsafe(), scale);
return super.validatedScaledDecimal(scale);
}
代码示例来源:origin: apache/hive
@Override
public long readSmallInt(int id) {
hiveDecimalWritable.set(dict.decodeToBinary(id).getBytesUnsafe(), scale);
return (long)(super.validatedDouble(hiveDecimalWritable.doubleValue(),
serdeConstants.SMALLINT_TYPE_NAME));
}
代码示例来源:origin: apache/hive
@Override
public float readFloat(int id) {
hiveDecimalWritable.set(dict.decodeToBinary(id).getBytesUnsafe(), scale);
return (float)(super.validatedDouble(hiveDecimalWritable.doubleValue(),
serdeConstants.FLOAT_TYPE_NAME));
}
代码示例来源:origin: apache/hive
@Override
public long readLong() {
hiveDecimalWritable.set(valuesReader.readBytes().getBytesUnsafe(), scale);
return (long)(super.validatedDouble(hiveDecimalWritable.doubleValue(),
serdeConstants.BIGINT_TYPE_NAME));
}
代码示例来源:origin: apache/hive
@Override
public long readSmallInt() {
hiveDecimalWritable.set(valuesReader.readBytes().getBytesUnsafe(), scale);
return (long)(super.validatedDouble(hiveDecimalWritable.doubleValue(),
serdeConstants.SMALLINT_TYPE_NAME));
}
代码示例来源:origin: apache/hive
@Override
public long readTinyInt() {
hiveDecimalWritable.set(valuesReader.readBytes().getBytesUnsafe(), scale);
return (long)(super.validatedDouble(hiveDecimalWritable.doubleValue(),
serdeConstants.TINYINT_TYPE_NAME));
}
代码示例来源:origin: apache/hive
@Override
public double readDouble(int id) {
hiveDecimalWritable.set(dict.decodeToBinary(id).getBytesUnsafe(), scale);
return (super.validatedDouble(hiveDecimalWritable.doubleValue(),
serdeConstants.DOUBLE_TYPE_NAME));
}
代码示例来源:origin: apache/hive
@Override
public long readLong(int id) {
hiveDecimalWritable.set(dict.decodeToBinary(id).getBytesUnsafe(), scale);
return (long)(super.validatedDouble(hiveDecimalWritable.doubleValue(),
serdeConstants.BIGINT_TYPE_NAME));
}
代码示例来源:origin: apache/hive
@Override
public long readInteger() {
hiveDecimalWritable.set(valuesReader.readBytes().getBytesUnsafe(), scale);
return (long)(super.validatedDouble(hiveDecimalWritable.doubleValue(),
serdeConstants.INT_TYPE_NAME));
}
代码示例来源:origin: apache/hive
@Override
public long readTinyInt(int id) {
hiveDecimalWritable.set(dict.decodeToBinary(id).getBytesUnsafe(), scale);
return (long)(super.validatedDouble(hiveDecimalWritable.doubleValue(),
serdeConstants.TINYINT_TYPE_NAME));
}
内容来源于网络,如有侵权,请联系作者删除!