-
Notifications
You must be signed in to change notification settings - Fork 47
Description
This ticket is for us to re-think how remainingVectors are being handled. Currently, we create an array containaing segments following the core segment. This array is searched each time a request is made to fetch a field from a segment.
We should explore using the LazySegmentFactory and a mechanism to efficiently fetch vectors for a particular SegmentType. For example, using an EnumMap to store processed vectors.
The life-cycle of a segment would be as follows. All possible segments are added to a remainaingVectors like data-structure, most likely an ArrayList of size three. When a request is made to fetch a field from a segment, the remainingVectors are scanned to locate the segment. As segment types are identified, they should be moved to the EnumMap for efficient subsequent lookups.