Class MultiTypeEsField
java.lang.Object
org.elasticsearch.xpack.esql.core.type.EsField
org.elasticsearch.xpack.esql.core.type.MultiTypeEsField
- All Implemented Interfaces:
Writeable
During IndexResolution it can occur that the same field is mapped to different types in different indices.
An
InvalidMappedField holds that information and allows for later resolution of the field
to a single type in ResolveUnionTypes.
If the plan contains a converted field attribute with mapping conflict, like EVAL x = x::long, this conversion
is fused into the FieldAttribute and represented by an instance of
this class instead of the InvalidMappedField.
This class is sent to the data nodes to inform them that they have to convert the type directly during field extraction.-
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
ConstructorsModifierConstructorDescriptionMultiTypeEsField(String name, DataType dataType, boolean aggregatable, Map<String, Expression> indexToConversionExpressions, EsField.TimeSeriesFieldType timeSeriesFieldType, Expression potentiallyUnmappedExpression) protected -
Method Summary
Modifier and TypeMethodDescriptionbooleangetConversionExpressionForIndex(String indexName) getWriteableName(TransportVersion transportVersion) This needs to be overridden by subclasses for specific serializationinthashCode()static MultiTypeEsFieldresolveFrom(InvalidMappedField invalidMappedField, Map<String, Expression> typesToConversionExpressions) toString()withPotentiallyUnmappedExpression(Expression potentiallyUnmappedExpression) voidwriteContent(StreamOutput out) This needs to be overridden by subclasses for specific serializationMethods inherited from class org.elasticsearch.xpack.esql.core.type.EsField
getDataType, getExactField, getExactInfo, getName, getProperties, getReader, getTimeSeriesFieldType, isAggregatable, isAlias, readFrom, readTimeSeriesFieldType, writeTimeSeriesFieldType, writeTo
-
Constructor Details
-
MultiTypeEsField
public MultiTypeEsField(String name, DataType dataType, boolean aggregatable, Map<String, Expression> indexToConversionExpressions, EsField.TimeSeriesFieldType timeSeriesFieldType, @Nullable Expression potentiallyUnmappedExpression) -
MultiTypeEsField
- Throws:
IOException
-
-
Method Details
-
writeContent
Description copied from class:EsFieldThis needs to be overridden by subclasses for specific serialization- Overrides:
writeContentin classEsField- Throws:
IOException
-
getWriteableName
Description copied from class:EsFieldThis needs to be overridden by subclasses for specific serialization- Overrides:
getWriteableNamein classEsField
-
getNodeStringName
- Overrides:
getNodeStringNamein classEsField
-
getPotentiallyUnmappedExpression
-
getIndexToConversionExpressions
-
getConversionExpressionForIndex
-
withPotentiallyUnmappedExpression
public MultiTypeEsField withPotentiallyUnmappedExpression(@Nullable Expression potentiallyUnmappedExpression) -
resolveFrom
public static MultiTypeEsField resolveFrom(InvalidMappedField invalidMappedField, Map<String, Expression> typesToConversionExpressions) -
equals
-
hashCode
public int hashCode() -
toString
-