-
Notifications
You must be signed in to change notification settings - Fork 65
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
Support for pattern matching across fields #107
Comments
One follow up thought on this issue; if we were to support more payload formats (like avro or protobuf), then using |
I agree with Rishi on syntax. I worry about implementation. If there are a bunch of these rules, the match-finding performance obviously becomes linear in their number. Right? |
+1
That is definitely a concern, so there might be limits we have to impose around e.g., the number of such comparisons and path depth in a rule |
Wildcard is a good reference. Depending on how many you use, the performance degrades but there's a way to understand the worst-case complexity upfront via the evaluator. We could offer a similar solution or update the existing evaluator. There's also some improvements we can make by trading off other dimensions. Take this rule
This can be recompiled to two sub-rules
and the perform computation similar to
or by making both of these as terminal rules for a match
There will always be some cost but if many folks have to build their own inefficient wrappers around ruler to support this behaviour, then its best to just include it in. |
Something new on this? |
What is your idea?
This has come up in several user discussions, especially around change data capture (CDC) that is often used with EventBridge Pipes and EventBridge Kafka Sink Connector, so posting here as a feature request.
Currently it is not possible to pattern match across fields in a JSON object e.g., a DynamoDB stream event (snippet) where I want to filter events that have a common (or different) value across fields, such as the value of
"S"
in"NewImage"
and"OldImage"
below.Another (non-CDC) example:
Suggested pattern:
Would you be willing to make the change?
No
Additional context
Add any other context (such as images, docs, posts) about the idea here.
The text was updated successfully, but these errors were encountered: