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 could occur that the same field is mapped to different types in different indices.
The class MultiTypeEfField.UnresolvedField holds that information and allows for later resolution of the field
to a single type during LogicalPlanOptimization.
If the plan contains conversion expressions for the different types, the resolution will be done using the conversion expressions,
in which case a MultiTypeEsField will be created to encapsulate the type resolution capabilities.
This class can be communicated to the data nodes and used during physical planning to influence field extraction so that
type conversion is done at the data node level.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.esql.core.type.EsField
EsField.ExactNested 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) protected -
Method Summary
Modifier and TypeMethodDescriptionbooleangetConversionExpressionForIndex(String indexName) This needs to be overridden by subclasses for specific serializationinthashCode()static MultiTypeEsFieldresolveFrom(InvalidMappedField invalidMappedField, Map<String, Expression> typesToConversionExpressions) toString()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, isAggregatable, isAlias, readFrom, writeTo
-
Constructor Details
-
MultiTypeEsField
public MultiTypeEsField(String name, DataType dataType, boolean aggregatable, Map<String, Expression> indexToConversionExpressions) -
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
-
getIndexToConversionExpressions
-
getConversionExpressionForIndex
-
resolveFrom
public static MultiTypeEsField resolveFrom(InvalidMappedField invalidMappedField, Map<String, Expression> typesToConversionExpressions) -
equals
-
hashCode
public int hashCode() -
toString
-