-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[pkg/ottl] Add IsList
Converter
#27870
Comments
I'd like to do this one at contribfest! |
Thanks @strawgate! |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
@strawgate Just checking in, are you still able to work on this? |
@evan-bradley sorry, was on partial leave for a little bit. I'll pick this up this week! |
Re-opened PR at #32392 |
Description: Add isList OTTL function that returns true if the target is a slice and returns false if it is not Link to tracking Issue: #27870 Testing: Added tests Documentation: Updated readme and added changelog entry --------- Co-authored-by: Tyler Helmuth <[email protected]>
The pr has been merged so I think this can be closed! |
Component(s)
pkg/ottl
Is your feature request related to a problem? Please describe.
OTTL has no way to check if a value is a
pcommon.Slice
type.Describe the solution you'd like
Add a new Converter,
IsList
that returns true if the given type is apcommon.Slice
(or equivalent type). It will work similarly to theIsMap
function.The implementing PR should
pkg/ottl/ottlfuncs/functions.go
pkg/ottl/ottlfuncs/README.md
Implementing this function will mean introducing a new
PSliceGetter
interface, similar to thePMapGetter
interface. If the type is a slice but cannot be converted to apcommon.Slice
, then an error should be returned.The text was updated successfully, but these errors were encountered: