### Description

![image](https://github.com/elastic/elasticsearch/assets/76245/d0443170-0419-4759-b505-7620ff3d6594)

The execution time of grouping stats by multiple keywords has increased: 1.2 to 1.6 seconds (with doc_partitioning), 4.3 to 6.7 seconds (with shard_partitioning). The equivalent query with the _search API takes 1.8 seconds.

`from nyc_taxis | ... | stats c = count(dropoff_datetime) by trip_type, payment_type, vendor_id`

This regression occurred since July 2, 2023, and I suspect it may be due to the PR: [Support multivalued fields on arbitrary grouping](https://github.com/elastic/elasticsearch-internal/pull/1340).

/cc @nik9000
x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/blockhash/PackedValuesBlockHash.java
}
            }
            ords.endPositionEntry();
            for (Group group : groups) {
                group.valueOffset += group.valueCount;
            }
        }
    }
    @Override
    public Block[] getKeys() {
        int size = Math.toIntExact(bytesRefHash.size());
        BatchEncoder.Decoder[] decoders = new BatchEncoder.Decoder[groups.length];
        Block.Builder[] builders = new Block.Builder[groups.length];
        for (int g = 0; g < builders.length; g++) {
            ElementType elementType = groups[g].spec.elementType();
            decoders[g] = BatchEncoder.decoder(elementType);
            builders[g] = elementType.newBlockBuilder(size);
        }
        BytesRef[] values = new BytesRef[(int) Math.min(100, bytesRefHash.size())];
        BytesRef[] nulls = new BytesRef[values.length];
        for (int offset = 0; offset < values.length; offset++) {
            values[offset] = new BytesRef();
            nulls[offset] = new BytesRef();
            nulls[offset].length = nullTrackingBytes;
        }
        int offset = 0;
        for (int i = 0; i < bytesRefHash.size(); i++) {
            values[offset] = bytesRefHash.get(i, values[offset]);
            
            nulls[offset].bytes = values[offset].bytes;