java.lang.Object
org.elasticsearch.compute.data.DocBlock.Builder
- All Implemented Interfaces:
Closeable,AutoCloseable,Block.Builder,org.elasticsearch.core.Releasable,BlockLoader.Builder
- Enclosing class:
DocBlock
-
Method Summary
Modifier and TypeMethodDescriptionappendDoc(int doc) Appends a null value to the block.appendSegment(int segment) appendShard(int shard) Begins a multivalued entry.build()Builds the block.voidclose()Copy the values inblockfrombeginInclusivetoendExclusiveinto this builder.Ends the current multi-value entry.longAn estimate of the number of bytes theBlockcreated byBlock.Builder.build()will use.mvOrdering(Block.MvOrdering mvOrdering) How are multivalued fields ordered? This defaults toBlock.MvOrdering.UNORDEREDbut when you set it toBlock.MvOrdering.DEDUPLICATED_AND_SORTED_ASCENDINGsome operators can optimize themselves.setShardRefCounted(ShardRefCounted shardRefCounters)
-
Method Details
-
setShardRefCounted
-
appendShard
-
appendSegment
-
appendDoc
-
appendNull
Description copied from interface:Block.BuilderAppends a null value to the block.- Specified by:
appendNullin interfaceBlock.Builder- Specified by:
appendNullin interfaceBlockLoader.Builder
-
beginPositionEntry
Description copied from interface:Block.BuilderBegins a multivalued entry. Calling this for the first time will put the builder into a mode that generates Blocks that returntruefromBlock.mayHaveMultivaluedFields()which can force less optimized code paths. So don't call this unless you are sure you are emitting more than one value for this position.- Specified by:
beginPositionEntryin interfaceBlock.Builder- Specified by:
beginPositionEntryin interfaceBlockLoader.Builder
-
endPositionEntry
Description copied from interface:Block.BuilderEnds the current multi-value entry.- Specified by:
endPositionEntryin interfaceBlock.Builder- Specified by:
endPositionEntryin interfaceBlockLoader.Builder
-
copyFrom
Description copied from interface:Block.BuilderCopy the values inblockfrombeginInclusivetoendExclusiveinto this builder.For single position copies use the faster
IntBlock.Builder.copyFrom(IntBlock, int),LongBlock.Builder.copyFrom(LongBlock, int), etc.- Specified by:
copyFromin interfaceBlock.Builder
-
mvOrdering
Description copied from interface:Block.BuilderHow are multivalued fields ordered? This defaults toBlock.MvOrdering.UNORDEREDbut when you set it toBlock.MvOrdering.DEDUPLICATED_AND_SORTED_ASCENDINGsome operators can optimize themselves. This is a promise that is never checked. If you set this to anything other thanBlock.MvOrdering.UNORDEREDbe sure the values are in that order or other operators will make mistakes. The actual ordering isn't checked at runtime.- Specified by:
mvOrderingin interfaceBlock.Builder
-
estimatedBytes
public long estimatedBytes()Description copied from interface:Block.BuilderAn estimate of the number of bytes theBlockcreated byBlock.Builder.build()will use. This may overestimate the size but shouldn't underestimate it.- Specified by:
estimatedBytesin interfaceBlock.Builder
-
build
Description copied from interface:Block.BuilderBuilds the block. This method can be called multiple times.- Specified by:
buildin interfaceBlock.Builder- Specified by:
buildin interfaceBlockLoader.Builder
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.elasticsearch.core.Releasable
-