private List<Pair<byte[], byte[]>> buildFuzzyKeys(Map<TblColRef, Set<String>> fuzzyValueSet) {
    ArrayList<Pair<byte[], byte[]>> result = new ArrayList<Pair<byte[], byte[]>>();

    // debug/profiling purpose
    if (BackdoorToggles.getDisableFuzzyKey()) {
      logger.info("The execution of this query will not use fuzzy key");
      return result;
    }

    FuzzyKeyEncoder fuzzyKeyEncoder = new FuzzyKeyEncoder(cubeSeg, cuboid);
    FuzzyMaskEncoder fuzzyMaskEncoder = new FuzzyMaskEncoder(cubeSeg, cuboid);

    List<Map<TblColRef, String>> fuzzyValues =
        FuzzyValueCombination.calculate(fuzzyValueSet, FUZZY_VALUE_CAP);
    for (Map<TblColRef, String> fuzzyValue : fuzzyValues) {
      result.add(
          new Pair<byte[], byte[]>(
              fuzzyKeyEncoder.encode(fuzzyValue), fuzzyMaskEncoder.encode(fuzzyValue)));
    }
    return result;
  }