int valueLength = 0;
if (state.getValue() != null && !state.getValue().isNull(0)) {
valueLength = state.getValue().getLength(0);
}
sliceOutput.writeInt(valueLength);
if (state.getKey() != null && !state.getKey().isNull(0)) {
appendTo(state.getKeyType(), sliceOutput, state.getKey());
}
if (state.getValue() != null && !state.getValue().isNull(0)) {