Description
Sometimes it'd be much more efficient to "fuse" a function into the loading of a field rather than load the whole field and apply the function. Take, for example, MV_MIN:
FROM foo | EVAL f = MV_MIN(f) | STATS SUM(f)
This'd be faster because:
- Numeric doc values are stored in sorted order. Instead of loading them all we could just get the first one.
- Instead of making a
Block and then running the MV_MIN implementation to turn it into a Vector, we could save the block allocations entirely.
There are likely a bunch of cases that could benefit slightly from this, but things like SUBSTRING and MV_MIN and MV_MAX feel like they'd get the most benefit right now because they'd save on allocations.
But the real killer use case is for when we implement geo_shape style points, specifically, we'll end up with a function to simplify the geometry
CC @iverase and @craigtaverner and @costin
Description
Sometimes it'd be much more efficient to "fuse" a function into the loading of a field rather than load the whole field and apply the function. Take, for example,
MV_MIN:This'd be faster because:
Blockand then running theMV_MINimplementation to turn it into aVector, we could save the block allocations entirely.There are likely a bunch of cases that could benefit slightly from this, but things like
SUBSTRINGandMV_MINandMV_MAXfeel like they'd get the most benefit right now because they'd save on allocations.But the real killer use case is for when we implement
geo_shapestyle points, specifically, we'll end up with a function to simplify the geometryCC @iverase and @craigtaverner and @costin