Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2447#discussion_r200368462
--- Diff:
core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java ---
@@ -1839,4 +1844,118 @@ public static void
removeInExpressionNodeWithPositionIdColumn(Expression express
}
}
}
+
+ public static byte[][] getEncodedFilterValues(CarbonDictionary
dictionary,
+ byte[][] actualFilterValues) {
+ if (null == dictionary) {
+ return actualFilterValues;
+ }
+ KeyGenerator keyGenerator = KeyGeneratorFactory.getKeyGenerator(new
int[] { 100000 });
+ List<byte[]> encodedFilters = new ArrayList<>();
+ for (byte[] actualFilter : actualFilterValues) {
+ for (int i = 1; i < dictionary.getDictionaryValues().length; i++) {
+ if (ByteUtil.UnsafeComparer.INSTANCE
+ .compareTo(actualFilter, dictionary.getDictionaryValues()[i])
+ == 0) {
--- End diff --
Format it properly
---