feat(kv-ir)!: Add support for matching KQL timestamp literals against integer and float values.#1848
Conversation
WalkthroughThese changes extend timestamp literal support in search functionality tests and utilities. Modifications include adding timestamp-formatted KQL expressions to test cases, introducing TimestampLiteral test operands with filter operations, and updating type mappings to include TimestampT in numeric literal types. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
LinZhihao-723
left a comment
There was a problem hiding this comment.
The code changes lgtm. My only concern is that this implementation will no longer allow comparing timestamp literal against an unparsed string representation. We should probably create an issue to keep track of this.
For the PR title, how about:
feat(kv-ir)!: Add support for matching KQL timestamp literals against integer and float values.
I feel like we should mark this as a breaking change since it changes the search behavior.
Makes sense. Yeah I figured it was better to just drop the string comparison support for now until we have time to do it properly -- created #1851 to track. |
… integer and float values. (y-scope#1848)
… integer and float values. (y-scope#1848)
… integer and float values. (y-scope#1848)
Description
This PR updates the mapping between kv-ir stream schema tree nodes and literal types in order to allow timestamp literals to match floats, integers, and nothing else.
In practice for the current way ASTs are generated from KQL and refined this was already possible (since timestamp literals can be converted to integer and float literals), but this PR makes the mapping more explicit and adds tests.
Checklist
breaking change.
Validation performed
clp-scli.Summary by CodeRabbit
Release Notes
Tests
Internal Updates
✏️ Tip: You can customize this high-level summary in your review settings.