in java/tsfile/src/main/java/org/apache/tsfile/read/reader/page/ValuePageReader.java [174:226]
public TsPrimitiveType nextValue(long timestamp, int timeIndex) throws IOException {
uncompressDataIfNecessary();
TsPrimitiveType resultValue = null;
if (valueBuffer == null || ((bitmap[timeIndex / 8] & 0xFF) & (MASK >>> (timeIndex % 8))) == 0) {
return null;
}
switch (dataType) {
case BOOLEAN:
boolean aBoolean = valueDecoder.readBoolean(valueBuffer);
if (!isDeleted(timestamp)) {
resultValue = new TsPrimitiveType.TsBoolean(aBoolean);
}
break;
case INT32:
case DATE:
int anInt = valueDecoder.readInt(valueBuffer);
if (!isDeleted(timestamp)) {
resultValue = new TsPrimitiveType.TsInt(anInt);
}
break;
case INT64:
case TIMESTAMP:
long aLong = valueDecoder.readLong(valueBuffer);
if (!isDeleted(timestamp)) {
resultValue = new TsPrimitiveType.TsLong(aLong);
}
break;
case FLOAT:
float aFloat = valueDecoder.readFloat(valueBuffer);
if (!isDeleted(timestamp)) {
resultValue = new TsPrimitiveType.TsFloat(aFloat);
}
break;
case DOUBLE:
double aDouble = valueDecoder.readDouble(valueBuffer);
if (!isDeleted(timestamp)) {
resultValue = new TsPrimitiveType.TsDouble(aDouble);
}
break;
case TEXT:
case BLOB:
case STRING:
Binary aBinary = valueDecoder.readBinary(valueBuffer);
if (!isDeleted(timestamp)) {
resultValue = new TsPrimitiveType.TsBinary(aBinary);
}
break;
default:
throw new UnSupportedDataTypeException(String.valueOf(dataType));
}
return resultValue;
}