in c3r-sdk-core/src/main/java/com/amazonaws/c3r/config/ColumnInsight.java [72:92]
public void observe(@NonNull final Value value) {
if (value.isNull()) {
seenNull = true;
return;
}
final byte[] bytes = ValueConverter.getBytesForColumn(value, getType(), settings);
final int length = (bytes == null) ? 0 : bytes.length;
if (getPad() != null && getPad().getType() == PadType.MAX && maxValueLength < length) {
maxValueLength = length;
}
final var clientTypeForValue = ValueConverter.getClientDataTypeForColumn(value, getType());
if (clientDataType == null) {
// First time observing a value, set the data type.
clientDataType = clientTypeForValue;
} else if (clientDataType != clientTypeForValue) {
// This value's data type does not match the rest of the column.
throw new C3rRuntimeException("Multiple client data types found in a single column: " + clientDataType + " and " +
value.getClientDataType() + ".");
}
}