Skip to content

Fail aggregations on shards if the value_type is incompatible with the field #72276

@not-napoleon

Description

@not-napoleon

Relates to #72040

Currently, when a user specifies a value_type that conflicts with the field type, we ignore the value_type and use the type from the field. This has the potential to fail later, possibly with an obscure error message, or return garbled results. In some use cases, it would be better to just fail that shard and return partial results. This issue is intended to explore that possibility.

From a technical standpoint, this should be easy to detect in ValuesSourceConfig#resolve() and throw a meaningful error from there.

Questions:

  • Do we want this as the default (only?) behavior, or do we need to add a flag to enable/disable it?
  • Is this a breaking change?
  • Are there cases where we do the right thing now, e.g. some sensible casting, which would break if we made this change?

I labeled this enhancement, but debatably this could be considered a bug fix. What we do now is pretty bad.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions