-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Whether we need an attribute of the array type? #312
Comments
Could you provide more use cases? |
Here is another example that I was working on.
There is no suitable storage structure for the field named |
I also find a use case that requires an array as a label. Now I have to marshal the array to a string, which makes the subsequent processing extremely inconvenient. It seems like this feature is necessary now. The next topic will be how we implement it to make it easy to use. |
For now, the AttributeMap we defined in DataGroup support to use
"string"
,"int"
and"bool"
as the value type.This design does not have the capacity to carry more complex data, it is more evident in some complex
Span
when we care about repetitive structured data. Here is an example.A DNS request contains more than one domain to look up. We can record each result captured in response, such as below.
However, it's hard to put this data into AttributeMap in a reasonable way now.
Describe the solution you'd like
Add MapAttributeType map And ArrayAttributeType is an obvious way to solve this problem.
And since we are using an array, it's more convenient to get the instance of the ArrayValue when using it.
Here we used some static struct to get the instance and not affect the exposed structure.
How we use this:
Additional context
The changes are not complex, but clearly affect the logic of the subsequent processing components, and we are not in high demand at the moment.
Is this change necessary?
The text was updated successfully, but these errors were encountered: