this.input = new DataInputStream(input);
}
}
public void readFields(ITuple tuple, Deserializer[] customDeserializers) throws IOException {
Schema schema = tuple.getSchema();
// If there are fields with nulls, read the bit field and set the values that are null
if (schema.containsNullableFields()) {
List<Integer> nullableFields = schema.getNullableFieldsIdx();
nullsAbsolute.ensureSize(schema.getFields().size());
nullsAbsolute.clear(nullableFields);
nullsRelative.deser(input);
for (int i = 0; i < nullableFields.size(); i++) {
if (nullsRelative.isSet(i)) {
int field = nullableFields.get(i);
tuple.set(field, null);
nullsAbsolute.flags[field] = true;
}
}
}
// Field by field deseralization
for(int index = 0; index < schema.getFields().size(); index++) {
Deserializer customDeser = customDeserializers[index];
Field field = schema.getField(index);
// Nulls control
if (field.isNullable() && nullsAbsolute.flags[index]) {
// Null field. Nothing to deserialize.
continue;