ESQL: Fix functions emitting warnings with no source#122821
ESQL: Fix functions emitting warnings with no source#122821ivancea merged 28 commits intoelastic:mainfrom
Conversation
…sabling serialization on broken functions
…in the future if we need it
…ons-warnings-fix # Conflicts: # server/src/main/java/org/elasticsearch/TransportVersions.java
# Conflicts: # server/src/main/java/org/elasticsearch/TransportVersions.java
|
Hi @ivancea, I've created a changelog YAML for you. |
| @Override | ||
| public TestCase get() { | ||
| TestCase supplied = supplier.get(); | ||
| if (types.size() != supplied.getData().size()) { |
There was a problem hiding this comment.
The for below wasn't checking the case where the TestCase data had more types than the supplier. This required fixing some cases in Top and Case
There was a problem hiding this comment.
This was one of the affected functions by the "warnings but no source" problem, but it had no tests for them. So here I added them based on the function errors
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
| /** | ||
| * Returns a list with N dataType1, followed by 1 dataType2. | ||
| */ | ||
| private static List<DataType> makeTypes(DataType dataType1, DataType dataType2, int n) { |
There was a problem hiding this comment.
Optional:
| private static List<DataType> makeTypes(DataType dataType1, DataType dataType2, int n) { | |
| private static List<DataType> typesList(DataType dataType1, DataType dataType2, int n) { |
astefan
left a comment
There was a problem hiding this comment.
I was expecting to see some changes in IT tests as well, meaning warning message that started having proper line:column numbers.
Do you know why the change in this PR is not "visible" in IT tests?
# Conflicts: # server/src/main/java/org/elasticsearch/TransportVersions.java
|
@astefan From what I saw, there are no CSV tests with warnings for those functions. I'll add some cases + capability for them to double-check. |
|
I don't know exactly what we have and what don't for this particular set of functionality this PR is addressing, thus my evasiveness. I am ok with CSV IT tests. Since this involves serializations and, implicitly, type resolution on the data nodes, make sure the queries used trigger this fix properly. |
# Conflicts: # server/src/main/java/org/elasticsearch/TransportVersions.java
Fixes #122588
Source.EMPTY.writeTo(out)tosource().writeTo(out)in functions emitting warningsPostAnalysisVerificationAwareTransportVersionto do soToLowerandToUpperweren't serializing a source, but they don't emit warnings. As they were the only remaining functions not serializing the source, I added it there too