APISonar


org.apache.hadoop.hive.ql.io.sarg.PredicateLeaf.Type.DATE

> org > apache > hadoop > hive > ql > io > sarg > PredicateLeaf > Type > DATE
org APIs apache APIs hadoop APIs hive APIs ql APIs io APIs sarg APIs PredicateLeaf APIs Type APIs DATE APIs

Example 1
public void testDateWritableNullSafeEqualsBloomFilter() throws Exception {
    PredicateLeaf pred = TestSearchArgumentImpl.createPredicateLeaf(
        PredicateLeaf.Operator.NULL_SAFE_EQUALS, PredicateLeaf.Type.DATE, "x", new DateWritable(15),
        null);
    BloomFilter bf = new BloomFilter(10000);
    for (int i = 20; i < 1000; i++) {
      bf.addLong((new DateWritable(i)).getDays());
    }
    ColumnStatistics cs = ColumnStatisticsImpl.deserialize(createDateStats(10, 100));
    assertEquals(TruthValue.NO, RecordReaderImpl.evaluatePredicate(cs, pred, bf));

    bf.addLong((new DateWritable(15)).getDays());
    assertEquals(TruthValue.YES_NO, RecordReaderImpl.evaluatePredicate(cs, pred, bf));
  }