-
Couldn't load subscription status.
- Fork 25.6k
ES|QL: add tests and fix docs for LOOKUP JOIN with index datemath #130535
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
ES|QL: add tests and fix docs for LOOKUP JOIN with index datemath #130535
Conversation
|
🔍 Preview links for changed docs: 🔔 The preview site may take up to 3 minutes to finish building. These links will become live once it completes. |
|
Pinging @elastic/es-docs (Team:Docs) |
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
🔍 Preview links for changed docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks Luigi!
Our docs now mention that wildcards also work as long as they resolve to a single lookup index. Do we have a test for this?
| } | ||
|
|
||
| public void testDateMathIndexPattern() throws IOException { | ||
| ZonedDateTime now = ZonedDateTime.now(ZoneOffset.UTC); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using now may lead to flakiness when the tests are executed around midnight, no? Maybe a fixed date would be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about it, but date math is all about dynamic patterns using now. I'm not sure a test with a fixed date will be realistic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I can do is to use the year only, that should drastically reduce the risk of flakiness
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How long does this test runs?
I have seen some sql/eql examples that add assumption they are executed at least 10-15 minutes before midnight.
@alex-spies yes, we have tests, but I completely misread them. We explicitly disallow the usage of |
| request.addParameter("refresh", "true"); | ||
| request.setJsonEntity("{\"f\":" + idx++ + "}"); | ||
| assertOK(client().performRequest(request)); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might need a refresh.
I wonder if we have anything similar to indexRandom for the RestTestCases?
💚 Backport successful
|
Adding tests and fixing docs for usage of date math in index patterns, especially in LOOKUP JOIN, that got recent support for aliases.