use of com.yahoo.bullet.parsing.Clause in project bullet-core by yahoo.
the class FilterOperations method performRelational.
private static boolean performRelational(BulletRecord record, FilterClause clause) {
Clause.Operation operator = clause.getOperation();
if (isEmpty(clause.getValues())) {
return true;
}
TypedObject object = extractTypedObject(clause.getField(), record);
if (operator == Clause.Operation.REGEX_LIKE) {
return REGEX_LIKE.compare(object, clause.getPatterns().stream());
}
return COMPARATORS.get(operator).compare(object, cast(object, clause.getValues()));
}
Aggregations