Class Dedup
java.lang.Object
org.elasticsearch.xpack.esql.core.tree.Node<LogicalPlan>
org.elasticsearch.xpack.esql.plan.QueryPlan<LogicalPlan>
org.elasticsearch.xpack.esql.plan.logical.LogicalPlan
org.elasticsearch.xpack.esql.plan.logical.UnaryPlan
org.elasticsearch.xpack.esql.plan.logical.Dedup
- All Implemented Interfaces:
NamedWriteable,Writeable,Resolvable,SurrogateLogicalPlan
Removes the rows that contain the same values for a list specified fields.
Dedup also receives a list of aggregates similar to
STATS.
In the current implementation Dedup implements SurrogateLogicalPlan and actually expands to STATS.
At the moment this is only used in the planning of the RRF command, but could evolve as a standalone command.-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.esql.plan.logical.LogicalPlan
LogicalPlan.StageNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
ConstructorsConstructorDescriptionDedup(Source source, LogicalPlan child, List<NamedExpression> aggregates, List<Attribute> groupings) -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected NodeInfo<? extends LogicalPlan> info()output()The ordered list of attributes (i.e.replaceChild(LogicalPlan newChild) Returns the plan to be replaced with.voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.xpack.esql.plan.logical.UnaryPlan
child, equals, hashCode, inputSet, outputSet, replaceChildrenMethods inherited from class org.elasticsearch.xpack.esql.plan.logical.LogicalPlan
analyzed, childrenResolved, optimized, preAnalyzed, resolved, setAnalyzed, setOptimized, setPreAnalyzedMethods inherited from class org.elasticsearch.xpack.esql.plan.QueryPlan
computeExpressions, computeReferences, expressions, forEachExpression, forEachExpression, forEachExpressionDown, forEachExpressionUp, references, transformExpressionsDown, transformExpressionsDown, transformExpressionsOnly, transformExpressionsOnly, transformExpressionsOnlyUp, transformExpressionsUp, transformExpressionsUpMethods inherited from class org.elasticsearch.xpack.esql.core.tree.Node
anyMatch, children, collect, collectFirstChildren, collectLeaves, doCollectFirst, forEachDown, forEachDown, forEachProperty, forEachPropertyDown, forEachPropertyOnly, forEachPropertyUp, forEachUp, forEachUp, nodeName, nodeProperties, nodeString, propertiesToString, replaceChildrenSameSize, source, sourceLocation, sourceText, toString, transformChildren, transformDown, transformDown, transformDown, transformNodeProps, transformPropertiesDown, transformPropertiesOnly, transformPropertiesUp, transformUp, transformUp, transformUp
-
Constructor Details
-
Dedup
public Dedup(Source source, LogicalPlan child, List<NamedExpression> aggregates, List<Attribute> groupings)
-
-
Method Details
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
info
- Specified by:
infoin classNode<LogicalPlan>
-
expressionsResolved
public boolean expressionsResolved()- Specified by:
expressionsResolvedin classLogicalPlan
-
replaceChild
- Specified by:
replaceChildin classUnaryPlan
-
surrogate
Description copied from interface:SurrogateLogicalPlanReturns the plan to be replaced with.- Specified by:
surrogatein interfaceSurrogateLogicalPlan
-
aggregates
-
groupings
-
finalAggs
-
output
Description copied from class:QueryPlanThe ordered list of attributes (i.e. columns) this plan produces when executed. Must be called only on resolved plans, otherwise may throw an exception or return wrong results.
-