use of uk.gov.gchq.koryphe.impl.predicate.AgeOff in project gaffer-doc by gchq.
the class AgeOffExample method ageOffInMilliseconds.
public void ageOffInMilliseconds() {
// ---------------------------------------------------------
final AgeOff function = new AgeOff(100000L);
// ---------------------------------------------------------
runExample(function, null, "", now, now - 100000L, now + 100000L, String.valueOf(now));
}
use of uk.gov.gchq.koryphe.impl.predicate.AgeOff in project Gaffer by gchq.
the class JavaPredicateToParquetPredicate method getParquetPredicate.
public FilterPredicate getParquetPredicate() throws SerialisationException {
FilterPredicate filterResult;
if (javaPredicate instanceof AgeOff) {
filterResult = getAgeOffPredicate((AgeOff) javaPredicate, selection, group, schemaUtils);
} else if (javaPredicate instanceof And) {
final And and = (And) javaPredicate;
filterResult = getAndFilter((List<Predicate>) and.getComponents(), selection, group, schemaUtils);
} else if (javaPredicate instanceof Or) {
final Or or = (Or) javaPredicate;
filterResult = getOrFilter((List<Predicate>) or.getComponents(), selection, group, schemaUtils);
} else if (javaPredicate instanceof Not) {
final Not not = (Not) javaPredicate;
final JavaPredicateToParquetPredicate predicateConverter = new JavaPredicateToParquetPredicate(schemaUtils, not.getPredicate(), selection, group);
final FilterPredicate parquetPredicate = predicateConverter.getParquetPredicate();
if (!predicateConverter.fullyApplied) {
fullyApplied = false;
}
filterResult = FilterPredicateUtils.not(parquetPredicate);
} else {
filterResult = getPrimitiveFilter(javaPredicate, selection[0], group, schemaUtils);
}
return filterResult;
}
Aggregations