docs: private void findGroupBys() {
      if (filters == null || filters.isEmpty()) {
        return;
      }
      
      if ((use_multi_gets && override_multi_get) && !search_query_failure) {
        
      }
      
      row_key_literals = new ByteMap<byte[][]>();
      final int expansion_limit = tsdb.getConfig().getInt(
          "tsd.query.filter.expansion_limit");
      
      Collections.sort(filters);
      final Iterator<TagVFilter> current_iterator = filters.iterator();
      final Iterator<TagVFilter> look_ahead = filters.iterator();
      byte[] tagk = null;
      TagVFilter next = look_ahead.hasNext() ? look_ahead.next() : null;
      int row_key_literals_count = 0;
      while (current_iterator.hasNext()) {
        next = look_ahead.hasNext() ? look_ahead.next() : null;
        int gbs = 0;
        // sorted!
        final ByteMap<Void> literals = new ByteMap<Void>();
        final List<TagVFilter> literal_filters = new ArrayList<TagVFilter>();
        TagVFilter current = null;
        do { // yeah, I'm breakin out the do!!!
          current = current_iterator.next();
          if (tagk == null) {
            tagk = new byte[TSDB.tagk_width()];
            System.arraycopy(current.getTagkBytes(), 0, tagk, 0, TSDB.tagk_width());
          }
          
          if (current.isGroupBy()) {
            gbs++;
          }
          if (!current.getTagVUids().isEmpty()) {
            for (final byte[] uid : current.getTagVUids()) {
              literals.put(uid, null);
            }
            literal_filters.add(current);
          }
  
          if (next != null && Bytes.memcmp(tagk, next.getTagkBytes()) != 0) {
            break;
          }
          next = look_ahead.hasNext() ? look_ahead.next() : null;
        } while (current_iterator.hasNext() && 
            Bytes.memcmp(tagk, current.getTagkBytes()) == 0);
  
        if (gbs > 0) {
          if (group_bys == null) {
            group_bys = new ArrayList<byte[]>();
          }
          group_bys.add(current.getTagkBytes());
        }
        
        if (literals.size() > 0) {
          if (literals.size() + row_key_literals_count > expansion_limit) {
            LOG.debug("Skipping literals for " + current.getTagk() + 
                " as it exceedes the limit");
            //has_filter_cannot_use_get = true;
          } else {
            final byte[][] values = new byte[literals.size()][];
            literals.keySet().toArray(values);
            row_key_literals.put(current.getTagkBytes(), values);
            row_key_literals_count += values.length;
            
            for (final TagVFilter filter : literal_filters) {
              filter.setPostScan(false);
            }
          }
        } else {
          row_key_literals.put(current.getTagkBytes(), null);
          // no literal values, just keys, so we can't multi-get
          if (search_query_failure) {
            use_multi_gets = false;
          }
        }
        
        // make sure the multi-get cardinality doesn't exceed our limit (or disable
        // multi-gets)
        if ((use_multi_gets && override_multi_get)) {
          int multi_get_limit = tsdb.getConfig().getInt("tsd.query.multi_get.limit");
          int cardinality = filters.size() * row_key_literals_count;
          if (cardinality > multi_get_limit) {
            use_multi_gets = false;
          } else if (search_query_failure) {
            row_key_literals_list.add(row_key_literals);
          }
          // TODO - account for time as well
        }
      }
    }