Class CompactMultiTypeEsField
java.lang.Object
org.elasticsearch.xpack.esql.core.type.EsField
org.elasticsearch.xpack.esql.core.type.UnionTypeEsField
org.elasticsearch.xpack.esql.core.type.CompactMultiTypeEsField
- All Implemented Interfaces:
Writeable
Memory-efficient variant of
MultiTypeEsField that stores the per-source-type conversion instead of per-index.-
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> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCompactMultiTypeEsField(String name, DataType dataType, boolean aggregatable, Map<DataType, Expression> typeToConversionExpressions, EsField.TimeSeriesFieldType timeSeriesFieldType, Expression unmappedConversionExpression) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the conversion expression to apply for the given sourceDataType, ornullif no conversion is registered for that type.Conversion expression to apply when the field is unmapped in the index (treating it asDataType.KEYWORD) ornullif there is no such conversion (i.e., unmapped indices should producenull).getWriteableName(TransportVersion transportVersion) This needs to be overridden by subclasses for specific serializationinthashCode()static CompactMultiTypeEsFieldresolveFrom(TypeConflictedField tcf, Map<String, Expression> typesToConversionExpressions, Expression unmappedConversionExpression) rewrapWithCast(Expression convertExpression) Wraps an existing union-type field's per-(index|type) conversions with another conversion expression on top, so the composite expression first does the original cast then the additional cast.toString()withPotentiallyUnmappedExpression(Expression unmappedExpression) Returns a copy of this field with the given unmapped conversion expression.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, withDataType, withWidenedSmallNumeric, writeTimeSeriesFieldType, writeTo
-
Field Details
-
CompactMultiTypeEsField
-
-
Constructor Details
-
CompactMultiTypeEsField
public CompactMultiTypeEsField(String name, DataType dataType, boolean aggregatable, Map<DataType, Expression> typeToConversionExpressions, EsField.TimeSeriesFieldType timeSeriesFieldType, @Nullable Expression unmappedConversionExpression)
-
-
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
-
getTypeToConversionExpressions
-
getConversionExpressions
- Specified by:
getConversionExpressionsin classUnionTypeEsField
-
rewrapWithCast
Description copied from class:UnionTypeEsFieldWraps an existing union-type field's per-(index|type) conversions with another conversion expression on top, so the composite expression first does the original cast then the additional cast.- Specified by:
rewrapWithCastin classUnionTypeEsField
-
withPotentiallyUnmappedExpression
Description copied from class:UnionTypeEsFieldReturns a copy of this field with the given unmapped conversion expression.- Specified by:
withPotentiallyUnmappedExpressionin classUnionTypeEsField
-
getConversionExpressionForType
Returns the conversion expression to apply for the given sourceDataType, ornullif no conversion is registered for that type. -
getUnmappedConversionExpression
Description copied from class:UnionTypeEsFieldConversion expression to apply when the field is unmapped in the index (treating it asDataType.KEYWORD) ornullif there is no such conversion (i.e., unmapped indices should producenull).- Specified by:
getUnmappedConversionExpressionin classUnionTypeEsField
-
resolveFrom
public static CompactMultiTypeEsField resolveFrom(TypeConflictedField tcf, Map<String, Expression> typesToConversionExpressions, @Nullable Expression unmappedConversionExpression) -
equals
-
hashCode
public int hashCode() -
toString
-