this.maxLength = maxLength;
}
@Override
Object next(Object previous) throws IOException {
HiveVarcharWritable result = null;
if (previous == null) {
result = new HiveVarcharWritable();
} else {
result = (HiveVarcharWritable) previous;
}
// Use the string reader implementation to populate the internal Text value
Object textVal = super.next(result.getTextValue());
if (textVal == null) {
return null;
}
// result should now hold the value that was read in.
// enforce varchar length
result.enforceMaxLength(maxLength);
return result;
}