MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / WindowSourceNode

Class WindowSourceNode

src/jrd/RecordSourceNodes.h:654–720  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

652};
653
654class WindowSourceNode final : public TypedNode<RecordSourceNode, RecordSourceNode::TYPE_WINDOW>
655{
656public:
657 struct Window
658 {
659 explicit Window(MemoryPool&)
660 : stream(INVALID_STREAM),
661 exclusion(WindowClause::Exclusion::NO_OTHERS)
662 {
663 }
664
665 StreamType stream;
666 NestConst<SortNode> group;
667 NestConst<SortNode> regroup;
668 NestConst<SortNode> order;
669 NestConst<MapNode> map;
670 NestConst<WindowClause::FrameExtent> frameExtent;
671 WindowClause::Exclusion exclusion;
672 };
673
674 explicit WindowSourceNode(MemoryPool& pool)
675 : TypedNode<RecordSourceNode, RecordSourceNode::TYPE_WINDOW>(pool),
676 rse(NULL),
677 windows(pool)
678 {
679 }
680
681 static WindowSourceNode* parse(thread_db* tdbb, CompilerScratch* csb);
682
683private:
684 void parseLegacyPartitionBy(thread_db* tdbb, CompilerScratch* csb);
685 void parseWindow(thread_db* tdbb, CompilerScratch* csb);
686
687public:
688 virtual StreamType getStream() const
689 {
690 fb_assert(false);
691 return 0;
692 }
693
694 virtual Firebird::string internalPrint(NodePrinter& printer) const;
695
696 virtual WindowSourceNode* copy(thread_db* tdbb, NodeCopier& copier) const;
697 virtual RecordSourceNode* pass1(thread_db* tdbb, CompilerScratch* csb);
698 virtual void pass1Source(thread_db* tdbb, CompilerScratch* csb, RseNode* rse,
699 BoolExprNode** boolean, RecordSourceNodeStack& stack);
700 virtual RecordSourceNode* pass2(thread_db* tdbb, CompilerScratch* csb);
701 virtual void pass2Rse(thread_db* tdbb, CompilerScratch* csb);
702 virtual bool containsStream(StreamType checkStream) const;
703 virtual void collectStreams(SortedStreamList& streamList) const;
704
705 virtual void computeDbKeyStreams(StreamList& /*streamList*/) const
706 {
707 }
708
709 virtual void computeRseStreams(StreamList& streamList) const;
710
711 virtual bool computable(CompilerScratch* csb, StreamType stream,

Callers 2

parseMethod · 0.85
copyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected