use of com.hazelcast.sql.impl.expression.ExpressionEvalContext in project hazelcast by hazelcast.
the class CreateDagVisitor method onSlidingWindow.
public Vertex onSlidingWindow(SlidingWindowPhysicalRel rel) {
int orderingFieldIndex = rel.orderingFieldIndex();
FunctionEx<ExpressionEvalContext, SlidingWindowPolicy> windowPolicySupplier = rel.windowPolicyProvider();
// this vertex is used only if there's no aggregation by a window bound
Vertex vertex = dag.newUniqueVertex("Sliding-Window", flatMapUsingServiceP(ServiceFactories.nonSharedService(ctx -> {
ExpressionEvalContext evalContext = ExpressionEvalContext.from(ctx);
SlidingWindowPolicy windowPolicy = windowPolicySupplier.apply(evalContext);
return row -> WindowUtils.addWindowBounds(row, orderingFieldIndex, windowPolicy);
}), (BiFunctionEx<Function<JetSqlRow, Traverser<JetSqlRow>>, JetSqlRow, Traverser<JetSqlRow>>) Function::apply));
connectInput(rel.getInput(), vertex, null);
return vertex;
}
use of com.hazelcast.sql.impl.expression.ExpressionEvalContext in project hazelcast by hazelcast.
the class UpdatingEntryProcessor method setSerializationService.
@Override
public void setSerializationService(SerializationService serializationService) {
this.evalContext = new ExpressionEvalContext(arguments, (InternalSerializationService) serializationService);
this.extractors = Extractors.newBuilder(evalContext.getSerializationService()).build();
}
Aggregations