- class PreallocatorMixin[source]
Mixin intented to be added to stages, typically source stages, which are emitting newly constructed DataFrame or MessageMeta instances into the segment. During segment build, if the
_needed_columnsaddtribut is not empty an additional node will be inserted into the graph after the derived class’ node which will perform the allocation.
The exceptions would be non-source stages like DFP’s
DFPFileToDataFrameStagewhich are not sources but are constructing new Dataframe instances, and
LinearBoundaryIngressStagewhich is potentially emitting other message types such as MultiMessages and it’s various derived messages but it would still be the first stage in the given segment emitting the message.
Sets the columns needed to perform preallocation.
Sets the columns needed to perform preallocation. This should only be called by the Pipeline at build time. The needed_columns shoudl contain the entire set of columns needed by any other stage in this segment.