-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Parse user type hints directly to ValuesSourceTypes #53424
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
Comments
Pinging @elastic/es-analytics-geo (:Analytics/Aggregations) |
@not-napoleon May I try to solve this issue? #65916 |
@RobertoMiyoshi see my comments on the PR. There's a surprising amount of complexity in this issue due to our backwards compatibility policies. |
Hi Mark, thank you for your review and feedback. In this new approach, I worried about the backwards compatibility policies. The previous mapping of user type hints to the ValuesSourceType was based on a Surjective function, i.e., several of ValueTypes can be mapped to the same ValuesSourceType. In order to maintain compatibility with previous version, the PR #66662 is proposing a new mapping through a Bijection, covering the parsing and output the same json that is currently accepted, and also serializing and deserializing the same bytes. |
Closing as something we're not planning on doing. |
In the current implementation, user type hints (specified via the
value_type
field on aggregations) get parsed leniently through theValueType
enum. TheValueType
enum doesn't really add anything however, and we immediately turn that input into aValuesSourceType
. Ideally, we should just parse the user's input directly into aValuesSourceType
While just getting parity with the current parsing would be sufficient, ideally we would tie into the
ValuesSourceRegistry
to allow for users hinting VSTs from plugins.Relates to #42949
The text was updated successfully, but these errors were encountered: