presto-main/src/main/java/io/prestosql/operator/aggregation/state/NullableBooleanStateSerializer.java/NullableBooleanStateSerializer/serialize
class NullableBooleanStateSerializer:    @Override
    public void serialize(NullableBooleanState state, BlockBuilder out)
    {
        if (state.isNull()) {
            out.appendNull();
        }
        else {
            BOOLEAN.writeBoolean(out, state.getBoolean());
        }
    }