Class PotentiallyUnmappedSingleTypeEsField

All Implemented Interfaces:
Writeable

public final class PotentiallyUnmappedSingleTypeEsField extends TypeConflictedField
A variant of PotentiallyUnmappedKeywordEsField that is mapped to exactly one, non-keyword type where it is mapped, and unmapped in other indices. Its EsField.getDataType() is that mapped type (widened for small numerics), because reporting DataType.UNSUPPORTED (as a bare TypeConflictedField does) breaks renames and groupings that read the type before this field is resolved. It retains the original, unwidened mapped EsField (with its properties) to fall back to.

If an implicit cast from DataType.KEYWORD to the mapped type exists, it is auto-cast to that type. Otherwise it behaves exactly as without UNMAPPED_FIELDS="LOAD" (mapped type where mapped, null where unmapped), unless an explicit cast accepting KEYWORD is applied directly to the field, which loads the unmapped rows from _source.

We treat this as a TypeConflictedField because it must still be resolved: via an implicit cast, an explicit cast, or fallback.