Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -432,9 +432,6 @@ tests:
- class: org.elasticsearch.xpack.esql.qa.single_node.PushQueriesIT
method: testPushCaseInsensitiveEqualityOnDefaults
issue: https://github.com/elastic/elasticsearch/issues/127431
- class: org.elasticsearch.xpack.esql.qa.single_node.GenerativeIT
method: test
issue: https://github.com/elastic/elasticsearch/issues/127536
- class: org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT
method: test {union_types.MultiIndexSortIpStringEval ASYNC}
issue: https://github.com/elastic/elasticsearch/issues/127537
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ private static String keep(List<Column> previousOutput) {
private static String randomName(List<Column> previousOutput) {
String result = randomRawName(previousOutput);
if (result.isEmpty() // bug https://github.com/elastic/elasticsearch/issues/125870, we'll manage it as an error later
|| result.contains("<")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you considered excluding <no-fields> from randomRawName instead?
And maybe create a static variable that excludes these two and be called in multiple places in this class; I see randomGroupableName and randomRawName excludes <all-fields-projected>.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, <all-fields-projected> is found in 8 places in this file...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point.
From a purely functional point of view, <no-fields> is there and you can use it, so having it in the tests would make sense.
On the other hand, quoting all the <something> fields would probably make the test less effective in discovering other bugs.
I think I'll go with your suggestion and just add <no-fields> to a blacklist

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh... I just tested it with

from no_* | limit 1 | keep `<no-fields>`
Unknown column [<no-fields>], did you mean [<no-fields>]?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did some refactoring, now the management of special cases for field names is centralized.

|| result.contains(">")
|| (randomBoolean() && result.contains("*") == false)) {
result = "`" + result + "`";
}
Expand Down