use of uk.gov.gchq.koryphe.impl.predicate.Not 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