use of org.apache.druid.query.monomorphicprocessing.RuntimeShapeInspector in project druid by druid-io.
the class AndFilter method makeMatcher.
private static ValueMatcher makeMatcher(final ValueMatcher[] baseMatchers) {
Preconditions.checkState(baseMatchers.length > 0);
if (baseMatchers.length == 1) {
return baseMatchers[0];
}
return new ValueMatcher() {
@Override
public boolean matches() {
for (ValueMatcher matcher : baseMatchers) {
if (!matcher.matches()) {
return false;
}
}
return true;
}
@Override
public void inspectRuntimeShape(RuntimeShapeInspector inspector) {
inspector.visit("firstBaseMatcher", baseMatchers[0]);
inspector.visit("secondBaseMatcher", baseMatchers[1]);
// Don't inspect the 3rd and all consequent baseMatchers, cut runtime shape combinations at this point.
// Anyway if the filter is so complex, Hotspot won't inline all calls because of the inline limit.
}
};
}
Aggregations