Allow VRL to have additional Value
types not in Vector
#26
Labels
type: enhancement
A value-adding code change that enhances its existing functionality
vrl: compiler
Changes to the compiler
A note for the community
Use Cases
Previously Vector and VRL had entirely separate
Value
types, since VRL has more types (such as regex) than Vector natively supports. These types were merged into a singleValue
type that contains all of the possible options to reduce the performance bottleneck of converting between the types. This is fast, but requires Vector itself to handle any type that VRL might want to have. (e.g. regex)I propose that these are split again (but differently). VRL gets it's own
Value
type that can contain any type valid in VRL. There will also be aValue
type shared between theTarget
(e.g. Vector) and VRL, which is a subset of what VRL can support (basically just the JSON types). This allows VRL to have additional types that don't need to be supported by theTarget
, while still allowing fast conversions between the two types.In order for this to work, VRL specific types will be restricted to local variables only in VRL, and can't be assigned to any external target.
Types will be checked at (VRL) compile time to ensure the following can't be assigned to external values, so type conversion won't need to happen at runtime
An example that could take advantage of allowing new types is #25
Version
0.24.0
The text was updated successfully, but these errors were encountered: