in c3r-sdk-parquet/src/main/java/com/amazonaws/c3r/data/ParquetValueFactory.java [252:282]
public ParquetValue createValueFromEncodedBytes(final byte[] bytes) {
final ClientDataType type = ValueConverter.clientDataTypeForEncodedValue(bytes);
switch (type) {
case BIGINT:
return getBigInt(bytes);
case BOOLEAN:
return getBoolean(bytes);
case CHAR:
return getStringType(ValueConverter.Char::decode, bytes);
case DATE:
return getDate(bytes);
case DECIMAL:
return getDecimal(bytes);
case DOUBLE:
return getDouble(bytes);
case FLOAT:
return getFloat(bytes);
case INT:
return getInt(bytes);
case SMALLINT:
return getSmallInt(bytes);
case STRING:
return getStringType(ValueConverter.String::decode, bytes);
case TIMESTAMP:
return getTimestamp(bytes);
case VARCHAR:
return getStringType((byte[] b) -> ValueConverter.Varchar.decode(b).getValue(), bytes);
default:
throw new C3rRuntimeException("Unable to decode bytes to a valid type.");
}
}