presto-main/src/main/java/io/prestosql/operator/aggregation/minmaxby/KeyAndBlockPositionValueStateSerializer.java/KeyAndBlockPositionValueStateSerializer/deserialize
class KeyAndBlockPositionValueStateSerializer:    @Override
    public void deserialize(Block block, int index, T state)
    {
        checkArgument(block instanceof AbstractRowBlock);
        ColumnarRow columnarRow = toColumnarRow(block);

        state.setFirstNull(BOOLEAN.getBoolean(columnarRow.getField(0), index));
        state.setSecondNull(BOOLEAN.getBoolean(columnarRow.getField(1), index));

        if (!state.isFirstNull()) {
            readFirstField(columnarRow.getField(2), index, state);
        }

        if (!state.isSecondNull()) {
            state.setSecondPosition(index);
            state.setSecondBlock(columnarRow.getField(3));
        }
    }