@VisibleForTesting public static boolean checkInBloomFilter(BloomFilter bloomFilter, Object predicateValue, Type sqlType) { if (sqlType == TINYINT || sqlType == SMALLINT || sqlType == INTEGER || sqlType == BIGINT) { return bloomFilter.testLong(((Number) predicateValue).longValue()); } if (sqlType == DOUBLE) { return bloomFilter.testDouble((Double) predicateValue); } if (sqlType instanceof VarcharType || sqlType instanceof VarbinaryType) { return bloomFilter.test(((Slice) predicateValue).getBytes()); } // todo support DECIMAL, FLOAT, DATE, TIMESTAMP, and CHAR return true; }
@VisibleForTesting public static boolean checkInBloomFilter(BloomFilter bloomFilter, Object predicateValue, Type sqlType) { if (sqlType == TINYINT || sqlType == SMALLINT || sqlType == INTEGER || sqlType == BIGINT) { return bloomFilter.testLong(((Number) predicateValue).longValue()); } if (sqlType == DOUBLE) { return bloomFilter.testDouble((Double) predicateValue); } if (sqlType instanceof VarcharType || sqlType instanceof VarbinaryType) { return bloomFilter.test(((Slice) predicateValue).getBytes()); } // todo support DECIMAL, FLOAT, DATE, TIMESTAMP, and CHAR return true; }
AggrColStats candidate = entry.getKey(); matchStats = entry.getValue(); if (candidate.getBloomFilter().test(partName.getBytes())) { ++matchStats.hits; } else {
@VisibleForTesting public static boolean checkInBloomFilter(BloomFilter bloomFilter, Object predicateValue, Type sqlType) { if (sqlType == TINYINT || sqlType == SMALLINT || sqlType == INTEGER || sqlType == BIGINT) { return bloomFilter.testLong(((Number) predicateValue).longValue()); } if (sqlType == DOUBLE) { return bloomFilter.testDouble((Double) predicateValue); } if (sqlType instanceof VarcharType || sqlType instanceof VarbinaryType) { return bloomFilter.test(((Slice) predicateValue).getBytes()); } // todo support DECIMAL, FLOAT, DATE, TIMESTAMP, and CHAR return true; }
@VisibleForTesting public static boolean checkInBloomFilter(BloomFilter bloomFilter, Object predicateValue, Type sqlType) { if (sqlType == TINYINT || sqlType == SMALLINT || sqlType == INTEGER || sqlType == BIGINT) { return bloomFilter.testLong(((Number) predicateValue).longValue()); } if (sqlType == DOUBLE) { return bloomFilter.testDouble((Double) predicateValue); } if (sqlType instanceof VarcharType || sqlType instanceof VarbinaryType) { return bloomFilter.test(((Slice) predicateValue).getBytes()); } // todo support DECIMAL, FLOAT, DATE, TIMESTAMP, and CHAR return true; }
AggrColStats candidate = entry.getKey(); matchStats = entry.getValue(); if (candidate.getBloomFilter().test(partName.getBytes())) { ++matchStats.hits; } else {
AggrColStats candidate = entry.getKey(); matchStats = entry.getValue(); if (candidate.getBloomFilter().test(partName.getBytes())) { ++matchStats.hits; } else {