-
Notifications
You must be signed in to change notification settings - Fork 25.8k
ESQL: InferNonNullAggConstraint using wrong field name for union types #127521
Copy link
Copy link
Closed
Labels
:Analytics/ES|QLAKA ESQLAKA ESQL>bugTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)Meta label for analytical engine team (ESQL/Aggs/Geo)
Description
@bpintea found another instance where we use FieldAttribute#name instead of FieldAttribute#fieldName; in case of union types (and so far only union types), these two differ with name being a synthetic string like $$field$converted_to$integer whereas fieldName contains the actual name of the field in the index.
C.f. #127225 (comment). As outlined in my comment, I think it'd be best to avoid this bug at compile time, by making our SearchStats require not just Strings for field names, but either EsFields (contained in every FieldAttribute) or a dedicated wrapper class/record like FieldName to be returned by FieldAttribute#fieldName (but not FieldAttribute#name).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
:Analytics/ES|QLAKA ESQLAKA ESQL>bugTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)Meta label for analytical engine team (ESQL/Aggs/Geo)
Type
Fields
Give feedbackNo fields configured for issues without a type.