Examples of WindowNode


Examples of com.facebook.presto.sql.planner.plan.WindowNode

            signatures.put(newSymbol, analysis.getFunctionInfo(windowFunction).getHandle());

            // create window node
            subPlan = new PlanBuilder(outputTranslations,
                    new WindowNode(idAllocator.getNextId(), subPlan.getRoot(), partitionBySymbols.build(), orderBySymbols.build(), orderings, assignments.build(), signatures));
        }

        return subPlan;
    }
View Full Code Here

Examples of com.facebook.presto.sql.planner.plan.WindowNode

            ImmutableMap.Builder<Symbol, SortOrder> orderings = ImmutableMap.builder();
            for (Map.Entry<Symbol, SortOrder> entry : node.getOrderings().entrySet()) {
                orderings.put(canonicalize(entry.getKey()), entry.getValue());
            }

            return new WindowNode(node.getId(), source, canonicalize(node.getPartitionBy()), canonicalize(node.getOrderBy()), orderings.build(), functionCalls.build(), functionInfos.build());
        }
View Full Code Here

Examples of com.facebook.presto.sql.planner.plan.WindowNode

                }
            }

            PlanNode source = planRewriter.rewrite(node.getSource(), expectedInputs.build());

            return new WindowNode(node.getId(), source, node.getPartitionBy(), node.getOrderBy(), node.getOrderings(), functionCalls.build(), functions.build());
        }
View Full Code Here

Examples of org.drools.core.reteoo.WindowNode

                                  pattern );
        }
       
        if( ! behaviors.isEmpty() ) {
            // build the window node:
            WindowNode wn = new WindowNode( context.getNextId(),
                                            alphaConstraints,
                                            behaviors,
                                            context.getObjectSource(),
                                            context );
            context.setObjectSource( (WindowNode) utils.attachNode( context,
View Full Code Here

Examples of org.drools.core.reteoo.WindowNode

                                  pattern );
        }
       
        if( ! behaviors.isEmpty() ) {
            // build the window node:
            WindowNode wn = new WindowNode( context.getNextId(),
                                            alphaConstraints,
                                            behaviors,
                                            context.getObjectSource(),
                                            context );
            context.setObjectSource( (WindowNode) utils.attachNode( context,
View Full Code Here

Examples of org.drools.core.reteoo.WindowNode

     */
    public void build(BuildContext context,
                      BuildUtils utils,
                      RuleConditionElement rce) {
        final WindowReference window = (WindowReference) rce;
        final WindowNode node = context.getKnowledgeBase().getReteooBuilder().getWindowNode( window.getName() );
       
        context.setObjectSource( node );
        context.setCurrentEntryPoint( node.getEntryPoint() );
     }
View Full Code Here

Examples of org.drools.core.reteoo.WindowNode

    }
   
    public static class BehaviorJobContextTimerInputMarshaller implements TimersInputMarshaller {
        public void read(MarshallerReaderContext inCtx) throws IOException, ClassNotFoundException {
            int sinkId = inCtx.readInt();
            WindowNode windowNode = (WindowNode) inCtx.sinks.get( sinkId );
           
            WindowMemory memory = (WindowMemory) inCtx.wm.getNodeMemory( windowNode );      
           
            Object[] behaviorContext = ( Object[]  ) memory.behaviorContext;
           
View Full Code Here

Examples of org.drools.core.reteoo.WindowNode

            this.pctx = pctx;
        }

        public BehaviorExpireWMAction(MarshallerReaderContext inCtx) throws IOException {
            nodeId = inCtx.readInt();
            WindowNode windowNode = (WindowNode) inCtx.sinks.get( nodeId );
           
            memory = (WindowMemory) inCtx.wm.getNodeMemory( windowNode );
           
            Object[] behaviorContext = ( Object[]  ) memory.behaviorContext;
           
            int i = inCtx.readInt();
           
            this.behavior = (SlidingTimeWindow) windowNode.getBehaviors()[i];
            this.context =  ( SlidingTimeWindowContext ) behaviorContext[i];
            pctx = null;
        }
View Full Code Here

Examples of org.drools.core.reteoo.WindowNode

        }
       
        public BehaviorExpireWMAction(MarshallerReaderContext context,
                                      Action _action) {
            nodeId =_action.getBehaviorExpire().getNodeId();
            WindowNode windowNode = (WindowNode) context.sinks.get( nodeId );
           
            memory = (WindowMemory) context.wm.getNodeMemory( windowNode );      
           
            Object[] behaviorContext = ( Object[]  ) memory.behaviorContext;
           
            int i = 0; //  <==== this needs fixing
           
            this.behavior = (SlidingTimeWindow) windowNode.getBehaviors()[i];
            this.context =  ( SlidingTimeWindowContext ) behaviorContext[i];
            pctx = null;
        }
View Full Code Here

Examples of org.drools.core.reteoo.WindowNode

                addLeftTupleSink(kBase,
                                 leftTupleSink,
                                 nodes);
            }
        } else if ( sink instanceof WindowNode ) {
            WindowNode node = (WindowNode) sink;
            nodes.put( sink.getId(), ((BaseNode)sink) );
            for ( ObjectSink objectSink : node.getSinkPropagator().getSinks() ) {
                addObjectSink(kBase, objectSink, nodes);
            }
        } else {
            ObjectSource node = ( ObjectSource ) sink;
            for ( ObjectSink objectSink : node.getSinkPropagator().getSinks() ) {
                addObjectSink( kBase,
                               objectSink,
                               nodes );
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.