Class MetadataAttribute
java.lang.Object
org.elasticsearch.xpack.esql.core.tree.Node<Expression>
org.elasticsearch.xpack.esql.core.expression.Expression
org.elasticsearch.xpack.esql.core.expression.NamedExpression
org.elasticsearch.xpack.esql.core.expression.Attribute
org.elasticsearch.xpack.esql.core.expression.TypedAttribute
org.elasticsearch.xpack.esql.core.expression.MetadataAttribute
- All Implemented Interfaces:
NamedWriteable,Writeable,Resolvable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.esql.core.expression.Attribute
Attribute.IdIgnoringWrapperNested classes/interfaces inherited from class org.elasticsearch.xpack.esql.core.expression.Expression
Expression.TypeResolutionNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.elasticsearch.xpack.esql.core.expression.Attribute
SYNTHETIC_ATTRIBUTE_NAME_PREFIXFields inherited from class org.elasticsearch.xpack.esql.core.tree.Node
TO_STRING_MAX_WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionMetadataAttribute(Source source, String name, DataType dataType, boolean searchable) MetadataAttribute(Source source, String name, DataType dataType, Nullability nullability, NameId id, boolean synthetic, boolean searchable) -
Method Summary
Modifier and TypeMethodDescriptionprotected MetadataAttributeclone(Source source, String qualifier, String name, DataType type, Nullability nullability, NameId id, boolean synthetic) static MetadataAttributestatic DataTypeprotected NodeInfo<? extends Expression> info()Normally, you want to use one of the staticcreatemethods to implement this.protected booleaninnerEquals(Object o, boolean ignoreIds) The actual equality check, after shortcuttingthis == oand class checks.protected intinnerHashCode(boolean ignoreIds) booleanbooleanisMetric()static booleanstatic booleanisSupported(String name) protected Stringlabel()static MetadataAttributereadFrom(StreamInput in) booleanvoidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.xpack.esql.core.expression.TypedAttribute
dataTypeMethods inherited from class org.elasticsearch.xpack.esql.core.expression.Attribute
canonicalize, checkAndSerializeQualifier, dataTypeEquals, ignoreId, nodeString, nullable, qualifiedName, qualifier, rawTemporaryName, readQualifier, references, replaceChildren, semanticEquals, semanticHash, toAttribute, toString, withDataType, withId, withLocation, withName, withNullability, withQualifierMethods inherited from class org.elasticsearch.xpack.esql.core.expression.NamedExpression
equals, equals, hashCode, hashCode, id, name, syntheticMethods inherited from class org.elasticsearch.xpack.esql.core.expression.Expression
canonical, childrenResolved, fold, foldable, propertiesToString, resolved, resolveType, typeResolvedMethods inherited from class org.elasticsearch.xpack.esql.core.tree.Node
anyMatch, children, collect, collectFirstChildren, collectLeaves, doCollectFirst, forEachDown, forEachDown, forEachDownMayReturnEarly, forEachProperty, forEachPropertyDown, forEachPropertyOnly, forEachPropertyUp, forEachUp, forEachUp, nodeName, nodeProperties, replaceChildrenSameSize, source, sourceLocation, sourceText, transformChildren, transformDown, transformDown, transformDown, transformNodeProps, transformPropertiesDown, transformPropertiesOnly, transformPropertiesUp, transformUp, transformUp, transformUp
-
Field Details
-
TIMESTAMP_FIELD
- See Also:
-
TSID_FIELD
- See Also:
-
SCORE
- See Also:
-
INDEX
- See Also:
-
-
Constructor Details
-
MetadataAttribute
public MetadataAttribute(Source source, String name, DataType dataType, Nullability nullability, @Nullable NameId id, boolean synthetic, boolean searchable) -
MetadataAttribute
-
-
Method Details
-
writeTo
- Throws:
IOException
-
readFrom
- Throws:
IOException
-
getWriteableName
-
clone
protected MetadataAttribute clone(Source source, String qualifier, String name, DataType type, Nullability nullability, NameId id, boolean synthetic) -
label
-
isDimension
public boolean isDimension()- Specified by:
isDimensionin classAttribute- Returns:
- true if the attribute represents a TSDB dimension type
-
isMetric
public boolean isMetric() -
info
Description copied from class:NodeNormally, you want to use one of the staticcreatemethods to implement this.For
QueryPlans, it is very important that the properties contain all of the expressions and references relevant to this node, and that all the properties are used in the provided constructor; otherwise query plan transformations likeQueryPlan#transformExpressionsOnly(Function)will not have an effect.- Specified by:
infoin classNode<Expression>
-
searchable
public boolean searchable() -
create
-
dataType
-
isSupported
-
isScoreAttribute
-
innerHashCode
protected int innerHashCode(boolean ignoreIds) - Overrides:
innerHashCodein classTypedAttribute
-
innerEquals
Description copied from class:NamedExpressionThe actual equality check, after shortcuttingthis == oand class checks.- Overrides:
innerEqualsin classTypedAttribute
-