Skip to content

Conversation

@RobertoMiyoshi
Copy link

@RobertoMiyoshi RobertoMiyoshi commented Dec 6, 2020

Closes #53424. Parses the user's input directly into a ValuesSourceType.

…f SOLID principles trying to reduce maintenance and modification costs by improving understandability, reliability, reusability and robustness.
…ctices of SOLID principles trying to reduce maintenance and modification costs by improving understandability, reliability, reusability and robustness."

This reverts commit 90fb919
…f SOLID principles trying to reduce maintenance and modification costs by improving understandability, reliability, reusability and robustness.
…ctices of SOLID principles trying to reduce maintenance and modification costs by improving understandability, reliability, reusability and robustness."

This reverts commit 90fb919
Copy link
Member

@not-napoleon not-napoleon left a comment

Choose a reason for hiding this comment

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

I appreciate your effort here, but unfortunately we can't just swap one class for the other like this. Changing the wire format is quite tricky, as we need to take into account backwards compatibility and cross cluster search requests. In this case, it's even trickier because I don't want to break existing queries by changing the accepted list of strings for type names.

So, for this to work, it needs to parse and output the same json that we currently accept, and also to serialize and deserialize the same bytes, or at least have a compatibility layer. If you want to take that on, you're welcome to, but please be warned this is not an easy refactor. In general, I wouldn't suggest something like this for a first time contributor (which is why it's not labeled "good first issue").

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
Copy link
Member

Choose a reason for hiding this comment

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

Wildcard imports are forbidden in our style guide. Not sure why that isn't being enforced automatically right now (I'm looking into it), but even so, please leave the imports as is.

See https://github.com/elastic/elasticsearch/blob/master/CONTRIBUTING.md#java-language-formatting-guidelines. I recommend you follow the instructions there to set up your IDE to use our auto-formatting settings.

Copy link
Author

Choose a reason for hiding this comment

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

Hi Mark, intellij automatically applied wildcard imports, sorry about that.
I just followed the instructions and configured my IDE.

@andreidan andreidan added the :Analytics/Aggregations Aggregations label Dec 16, 2020
@elasticmachine elasticmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Dec 16, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (Team:Analytics)

@elasticsearchmachine elasticsearchmachine changed the base branch from master to main July 22, 2022 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/Aggregations Aggregations Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parse user type hints directly to ValuesSourceTypes

4 participants