Module org.elasticsearch.compute
Class MultivalueDedupeBoolean
java.lang.Object
org.elasticsearch.compute.operator.mvdedupe.MultivalueDedupeBoolean
Removes duplicate values from multivalued positions.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbatchEncoder(int batchSize) Build aBatchEncoderwhich deduplicates values at each position and then encodes the results into awhich can be used for things like hashing many fields together.invalid reference
byte[]dedupeToBlock(BlockFactory blockFactory) Dedupe values using an adaptive algorithm based on the size of the input list.hash(BlockFactory blockFactory, boolean[] everSeen) Dedupe values and build aLongBlocksuitable for passing as the grouping block to aGroupingAggregatorFunction.static inthashOrd(boolean[] everSeen, boolean b) Convert the boolean to an ordinal and track if it's been seen ineverSeen.sortToBlock(BlockFactory blockFactory, boolean ascending) Sort values from each position and write the results to aBlock.
-
Field Details
-
NULL_ORD
public static final int NULL_ORDOrdinal assigned tonull.- See Also:
-
FALSE_ORD
public static final int FALSE_ORDOrdinal assigned tofalse.- See Also:
-
TRUE_ORD
public static final int TRUE_ORDOrdinal assigned totrue.- See Also:
-
-
Constructor Details
-
MultivalueDedupeBoolean
-
-
Method Details
-
dedupeToBlock
Dedupe values using an adaptive algorithm based on the size of the input list. -
sortToBlock
Sort values from each position and write the results to aBlock. -
hash
Dedupe values and build aLongBlocksuitable for passing as the grouping block to aGroupingAggregatorFunction.- Parameters:
everSeen- array tracking if the valuesfalseandtrueare ever seen
-
batchEncoder
Build aBatchEncoderwhich deduplicates values at each position and then encodes the results into awhich can be used for things like hashing many fields together.invalid reference
byte[] -
hashOrd
public static int hashOrd(boolean[] everSeen, boolean b) Convert the boolean to an ordinal and track if it's been seen ineverSeen.
-