use of com.yahoo.elide.datastores.aggregation.queryengines.sql.expression.HasJoinVisitor in project elide by yahoo.
the class SubqueryFilterSplitter method visitPredicate.
@Override
public SplitFilter visitPredicate(FilterPredicate filterPredicate) {
Type<?> tableType = filterPredicate.getEntityType();
String fieldName = filterPredicate.getField();
SQLTable table = metaDataStore.getTable(tableType);
List<Reference> references = parser.parse(table, table.getColumnProjection(fieldName));
boolean hasJoin = references.stream().anyMatch(ref -> ref.accept(new HasJoinVisitor()));
if (hasJoin) {
return SplitFilter.builder().outer(filterPredicate).build();
}
return SplitFilter.builder().inner(filterPredicate).build();
}
Aggregations