use of org.apache.storm.sql.runtime.streams.functions.EvaluationFilter in project storm by apache.
the class StreamsFilterRel method streamsPlan.
@Override
public void streamsPlan(StreamsPlanCreator planCreator) throws Exception {
// SingleRel
RelNode input = getInput();
StormRelUtils.getStormRelInput(input).streamsPlan(planCreator);
Stream<Values> inputStream = planCreator.pop();
List<RexNode> childExps = getChildExps();
RelDataType inputRowType = getInput(0).getRowType();
String filterClassName = StormRelUtils.getClassName(this);
ExecutableExpression filterInstance = planCreator.createScalarInstance(childExps, inputRowType, filterClassName);
EvaluationFilter evalFilter = new EvaluationFilter(filterInstance, planCreator.getDataContext());
final Stream<Values> finalStream = inputStream.filter(evalFilter);
planCreator.addStream(finalStream);
}
Aggregations