Class TypeConflictedField
java.lang.Object
org.elasticsearch.xpack.esql.core.type.EsField
org.elasticsearch.xpack.esql.core.type.TypeConflictedField
- All Implemented Interfaces:
Writeable
- Direct Known Subclasses:
CompactInvalidMappedField,InvalidMappedField,PotentiallyUnmappedSingleTypeEsField
public abstract sealed class TypeConflictedField
extends EsField
permits InvalidMappedField, CompactInvalidMappedField, PotentiallyUnmappedSingleTypeEsField
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.esql.core.type.EsField
EsField.Exact, EsField.TimeSeriesFieldTypeNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
ConstructorsConstructorDescriptionTypeConflictedField(String name, DataType esDataType, Map<String, EsField> properties, boolean aggregatable, EsField.TimeSeriesFieldType timeSeriesFieldType) -
Method Summary
Modifier and TypeMethodDescriptionReturns the path to the keyword version of this field if this field is text and it has a subfield that is indexed as keyword, throws an exception if such field is not found or the field name itself in all other cases.Returns andEsField.Exactobject with all the necessary info about the field: If it has an exact underlying field or not and if not an error message why it doesn'tPer-source-type indices in which the field appears with that type.abstract booleanWhether the field is unmapped in at least one index, in which case it's treated asDataType.KEYWORDwhere it is unmapped.booleanA "two-legged PUNK": a field that is mapped to a single type in some indices and unmapped in others.The single mapped source type (e.g.The single mapped type widened to its ES|QL surface type (e.g.types()Source data types observed for this field across all indices.Methods inherited from class org.elasticsearch.xpack.esql.core.type.EsField
equals, getDataType, getName, getNodeStringName, getProperties, getReader, getTimeSeriesFieldType, getWriteableName, hashCode, isAggregatable, isAlias, readFrom, readTimeSeriesFieldType, toString, withDataType, withWidenedSmallNumeric, writeContent, writeTimeSeriesFieldType, writeTo
-
Constructor Details
-
TypeConflictedField
-
TypeConflictedField
- Throws:
IOException
-
-
Method Details
-
getExactField
Description copied from class:EsFieldReturns the path to the keyword version of this field if this field is text and it has a subfield that is indexed as keyword, throws an exception if such field is not found or the field name itself in all other cases. To avoid the exceptionEsField.getExactInfo()should be used beforehand, to check if an exact field exists and if not get the errorMessage which explains why is that.- Overrides:
getExactFieldin classEsField
-
getExactInfo
Description copied from class:EsFieldReturns andEsField.Exactobject with all the necessary info about the field:- If it has an exact underlying field or not
- and if not an error message why it doesn't
- Overrides:
getExactInfoin classEsField
-
errorMessage
-
getTypesToIndices
Per-source-type indices in which the field appears with that type. Note thatCompactInvalidMappedFieldcaps each set and may include the"..."sentinel; callers that need a complete index list should useInvalidMappedFieldinstead. -
isPotentiallyUnmapped
public abstract boolean isPotentiallyUnmapped()Whether the field is unmapped in at least one index, in which case it's treated asDataType.KEYWORDwhere it is unmapped. -
types
Source data types observed for this field across all indices. -
isSingleTypePotentiallyUnmapped
public boolean isSingleTypePotentiallyUnmapped()A "two-legged PUNK": a field that is mapped to a single type in some indices and unmapped in others. Underunmapped_fields="load"this is not a genuine type conflict — values are loaded where the field is mapped and are null where it is unmapped. -
singleMappedType
The single mapped source type (e.g.SHORT). Only valid whenisSingleTypePotentiallyUnmapped(). -
singleMappedTypeWidened
The single mapped type widened to its ES|QL surface type (e.g.SHORT -> INTEGER), so the implicit load matches an explicit cast and agrees with the Fork/UnionAll output. Only valid whenisSingleTypePotentiallyUnmapped().
-