本文整理了Java中org.apache.parquet.column.Dictionary.decodeToBoolean()
方法的一些代码示例,展示了Dictionary.decodeToBoolean()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dictionary.decodeToBoolean()
方法的具体详情如下:
包路径:org.apache.parquet.column.Dictionary
类名称:Dictionary
方法名:decodeToBoolean
暂无
代码示例来源:origin: apache/hive
@Override
public boolean readBoolean(int id) {
return dict.decodeToBoolean(id);
}
代码示例来源:origin: apache/hive
@Override
public byte[] readString(int id) {
return convertToBytes(dict.decodeToBoolean(id));
}
代码示例来源:origin: apache/hive
@Override
public byte[] readVarchar(int id) {
String value = enforceMaxLength(
convertToString(dict.decodeToBoolean(id)));
return convertToBytes(value);
}
代码示例来源:origin: apache/hive
@Override
public byte[] readChar(int id) {
String value = enforceMaxLength(
convertToString(dict.decodeToBoolean(id)));
return convertToBytes(value);
}
代码示例来源:origin: org.lasersonlab.apache.parquet/parquet-column
public boolean getBoolean() {
return dictionary.decodeToBoolean(dictionaryId);
}
public long getLong() {
代码示例来源:origin: org.apache.parquet/parquet-column
public boolean getBoolean() {
return dictionary.decodeToBoolean(dictionaryId);
}
public long getLong() {
代码示例来源:origin: com.alibaba.blink/flink-table
@Override
public boolean decodeToBoolean(int id) {
return dictionary.decodeToBoolean(id);
}
代码示例来源:origin: dremio/dremio-oss
public static void printDictionary(ColumnDescriptor columnDescriptor, Dictionary localDictionary) {
System.out.println("Dictionary for column " + columnDescriptor.toString());
for (int i = 0; i < localDictionary.getMaxId(); ++i) {
switch (columnDescriptor.getType()) {
case INT32:
System.out.println(format("%d: %d", i, localDictionary.decodeToInt(i)));
break;
case INT64:
System.out.println(format("%d: %d", i, localDictionary.decodeToLong(i)));
break;
case INT96:
case BINARY:
case FIXED_LEN_BYTE_ARRAY:
System.out.println(format("%d: %s", i, new String(localDictionary.decodeToBinary(i).getBytesUnsafe())));
break;
case FLOAT:
System.out.println(format("%d: %f", i, localDictionary.decodeToFloat(i)));
break;
case DOUBLE:
System.out.println(format("%d: %f", i, localDictionary.decodeToDouble(i)));
break;
case BOOLEAN:
System.out.println(format("%d: %b", i, localDictionary.decodeToBoolean(i)));
break;
default:
break;
}
}
}
}
代码示例来源:origin: dremio/dremio-oss
localIdToGlobalId[i] = pageReader.dictionary.decodeToBoolean(i) ? 1 : 0;
代码示例来源:origin: uk.gov.gchq.gaffer/parquet-store
@Override
public void addValueFromDictionary(final int dictionaryId) {
switch (expectedType) {
case "Binary": final Binary binary = this.dictionary.decodeToBinary(dictionaryId);
addBinary(binary);
break;
case "boolean": final boolean bool = this.dictionary.decodeToBoolean(dictionaryId);
addBoolean(bool);
break;
case "double": final double aDouble = this.dictionary.decodeToDouble(dictionaryId);
addDouble(aDouble);
break;
case "float": final float aFloat = this.dictionary.decodeToFloat(dictionaryId);
addFloat(aFloat);
break;
case "int": final int anInt = this.dictionary.decodeToInt(dictionaryId);
addInt(anInt);
break;
case "long": final long aLong = this.dictionary.decodeToLong(dictionaryId);
addLong(aLong);
break;
default: break;
}
}
内容来源于网络,如有侵权,请联系作者删除!