private List<GTRecord> buildFuzzyKeys(Map<Integer, Set<ByteArray>> fuzzyValueSet) { ArrayList<GTRecord> result = Lists.newArrayList(); if (fuzzyValueSet.isEmpty()) return result; // debug/profiling purpose if (BackdoorToggles.getDisableFuzzyKey()) { logger.info("The execution of this query will not use fuzzy key"); return result; } List<Map<Integer, ByteArray>> fuzzyValueCombinations = FuzzyValueCombination.calculate(fuzzyValueSet, maxFuzzyKeys); for (Map<Integer, ByteArray> fuzzyValue : fuzzyValueCombinations) { GTRecord fuzzy = new GTRecord(gtInfo); for (Map.Entry<Integer, ByteArray> entry : fuzzyValue.entrySet()) { fuzzy.set(entry.getKey(), entry.getValue()); } result.add(fuzzy); } return result; }
private List<GTRecord> buildFuzzyKeys(Map<Integer, Set<ByteArray>> fuzzyValueSet) { ArrayList<GTRecord> result = Lists.newArrayList(); if (fuzzyValueSet.isEmpty()) return result; // debug/profiling purpose if (BackdoorToggles.getDisableFuzzyKey()) { logger.info("The execution of this query will not use fuzzy key"); return result; } List<Map<Integer, ByteArray>> fuzzyValueCombinations = FuzzyValueCombination.calculate(fuzzyValueSet, maxFuzzyKeys); for (Map<Integer, ByteArray> fuzzyValue : fuzzyValueCombinations) { GTRecord fuzzy = new GTRecord(gtInfo); for (Map.Entry<Integer, ByteArray> entry : fuzzyValue.entrySet()) { fuzzy.set(entry.getKey(), entry.getValue()); } result.add(fuzzy); } return result; }