Class ExternalMetadataAttribute
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.ExternalMetadataAttribute
- All Implemented Interfaces:
NamedWriteable,Writeable,Resolvable,VirtualAttribute
Virtual column for external data sources (file metadata, partition columns).
Behaves like a regular column for resolution and filtering but is excluded
from wildcard (
*) expansion — users must name it explicitly.
Mirrors MetadataAttribute's shape but extends TypedAttribute
directly because MetadataAttribute is final. Implements the
VirtualAttribute marker so format-level pushdown rules (filter and aggregate)
reject it - values are materialized by VirtualColumnIterator on the
producer thread and have no presence in the underlying file's schema.
-
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 class org.elasticsearch.xpack.esql.core.tree.Node
Node.NodeStringFormatNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from class org.elasticsearch.xpack.esql.core.expression.Attribute
SYNTHETIC_ATTRIBUTE_NAME_PREFIX, SYNTHETIC_ATTRIBUTE_NAME_SEPARATORFields inherited from class org.elasticsearch.xpack.esql.core.tree.Node
TO_STRING_MAX_LINES, TO_STRING_MAX_WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionExternalMetadataAttribute(Source source, String name, DataType dataType) ExternalMetadataAttribute(Source source, String name, DataType dataType, Nullability nullability, NameId id, boolean synthetic) -
Method Summary
Modifier and TypeMethodDescriptionprotected ExternalMetadataAttributeclone(Source source, String qualifier, String name, DataType type, Nullability nullability, NameId id, boolean synthetic) protected NodeInfo<? extends Expression> info()Normally, you want to use one of the staticcreatemethods to implement this.booleanbooleanisMetric()protected Stringlabel()static ExternalMetadataAttributereadFrom(StreamInput in) voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.xpack.esql.core.expression.TypedAttribute
dataType, innerEquals, innerHashCodeMethods 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, toString, typeResolvedMethods inherited from class org.elasticsearch.xpack.esql.core.tree.Node
allMatch, anyMatch, children, collect, collect, collect, collectFirstChildren, collectLeaves, doCollectFirst, forEachDown, forEachDown, forEachDownMayReturnEarly, forEachProperty, forEachPropertyDown, forEachPropertyOnly, forEachPropertyUp, forEachUp, forEachUp, nodeName, nodeProperties, nodeString, replaceChildrenSameSize, source, sourceLocation, sourceText, toString, transformChildren, transformChildren, transformDown, transformDown, transformDown, transformDown, transformDownSkipBranch, transformNodeProps, transformPropertiesDown, transformPropertiesOnly, transformPropertiesUp, transformUp, transformUp, transformUp
-
Field Details
-
ENTRY
-
-
Constructor Details
-
ExternalMetadataAttribute
-
ExternalMetadataAttribute
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
readFrom
- Throws:
IOException
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable
-
clone
protected ExternalMetadataAttribute 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>
-