@Override
        public Key read(final DataReader reader) {
            // Read number of key parts (depth).
            final int size = (reader.readByteUnsigned());

            // Read key parts.
            final List<KeyPart> list = new ArrayList<>(size);
            for (int i = 0; i < size; i++) {
                // Determine if this is a grouped part.
                final boolean grouped = reader.readBoolean();
                if (grouped) {
                    list.add(new GroupKeyPart(ValSerialiser.readArray(reader)));
                } else {
                    list.add(new UngroupedKeyPart(reader.readLong()));
                }
            }
            return new Key(0, list);
        }
Creates a nested group key. <DEPTH><LIST OF GROUP VAL ARRAYS>
stroom-query/stroom-query-common/src/main/java/stroom/query/common/v2/KeyFactoryFactory.java