-
Notifications
You must be signed in to change notification settings - Fork 25.6k
ESQL: More specific index pattern in testMultipleBatchesWithLookupJoin #130006
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
Changes from 3 commits
8367062
3748346
3d6619a
58364e4
9fc2db3
f6b8f1b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1014,12 +1014,14 @@ public void testMultipleBatchesWithLookupJoin() throws IOException { | |
| // Create more than 10 indices to trigger multiple batches of data node execution. | ||
| // The sort field should be missing on some indices to reproduce NullPointerException caused by duplicated items in layout | ||
| for (int i = 1; i <= 20; i++) { | ||
| createIndex("idx" + i, randomBoolean(), "\"mappings\": {\"properties\" : {\"a\" : {\"type\" : \"keyword\"}}}"); | ||
| createIndex("no_sort_field_idx" + i, randomBoolean(), "\"mappings\": {\"properties\" : {\"a\" : {\"type\" : \"keyword\"}}}"); | ||
| } | ||
| bulkLoadTestDataLookupMode(10); | ||
| // lookup join with and without sort | ||
| for (String sort : List.of("", "| sort integer")) { | ||
| var query = requestObjectBuilder().query(format(null, "from * | lookup join {} on integer {}", testIndexName(), sort)); | ||
| var query = requestObjectBuilder().query( | ||
| format(null, "from {},no_sort_field_idx* | lookup join {} on integer {}", testIndexName(), testIndexName(), sort) | ||
| ); | ||
| Map<String, Object> result = runEsql(query); | ||
| var columns = as(result.get("columns"), List.class); | ||
| assertEquals(22, columns.size()); | ||
|
||
|
|
@@ -1028,7 +1030,7 @@ public void testMultipleBatchesWithLookupJoin() throws IOException { | |
| } | ||
| // clean up | ||
| for (int i = 1; i <= 20; i++) { | ||
| assertThat(deleteIndex("idx" + i).isAcknowledged(), is(true)); | ||
| assertThat(deleteIndex("no_sort_field_idx" + i).isAcknowledged(), is(true)); | ||
| } | ||
| } | ||
|
|
||
|
|
||
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 wonder if we should go one step forward and rely on
randomIdentifier()for the index name here?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.
That makes clean up a little harder as I'd need to keep track of the index names to delete them later or make it so I can perform a wildcard delete. This should be fine, I don't think this was the root cause of the failure.