use of io.prestosql.spi.function.OperatorType.EQUAL in project hetu-core by openlookeng.
the class RowExpressionDomainTranslator method extractDisjuncts.
private List<RowExpression> extractDisjuncts(Type type, DiscreteValues discreteValues, RowExpression reference) {
List<RowExpression> values = discreteValues.getValues().stream().map(object -> toRowExpression(object, type)).collect(toList());
// If values is empty, then the equatableValues was either ALL or NONE, both of which should already have been checked for
checkState(!values.isEmpty());
RowExpression predicate;
if (values.size() == 1) {
predicate = equal(reference, getOnlyElement(values));
} else {
predicate = in(reference, values);
}
if (!discreteValues.isWhiteList()) {
predicate = not(functionResolution, predicate);
}
return ImmutableList.of(predicate);
}
Aggregations