Class BlockArrowFormatter
java.lang.Object
org.elasticsearch.xpack.esql.formatter.arrow.BlockArrowFormatter
- Direct Known Subclasses:
BlockArrowFormatter.AsBoolean,BlockArrowFormatter.AsDateRange,BlockArrowFormatter.AsFloat64,BlockArrowFormatter.AsInt32,BlockArrowFormatter.AsInt64,BlockArrowFormatter.AsNull,BlockArrowFormatter.BytesReFormatter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classConversion of Boolean blocksstatic classConversion of LongRangeBlocks (DATE_RANGE) to an Arrow struct with "from" and "to" timestamp[ms] fields.static classConversion of Double blocksstatic classConversion of Int blocksstatic classConversion of Long blocksstatic classstatic classstatic classstatic interfacestatic classConversion of ByteRef blocksstatic classConversion of ByteRefs where each value is itself converted to a different format. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBlockArrowFormatter(DataType esqlType, org.apache.arrow.vector.types.Types.MinorType minorType) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFieldNodes(Block block, boolean multivalued, List<org.apache.arrow.vector.ipc.message.ArrowFieldNode> nodes) Add Arrow field nodes for this block.org.apache.arrow.vector.types.pojo.FieldarrowField(String name) abstract voidconvert(Block block, boolean multivalued, List<org.apache.arrow.memory.ArrowBuf> bufs, List<BlockArrowFormatter.BufWriter> bufWriters) Convert a block into Arrow buffers.protected intnullValuesCount(Block block)
-
Field Details
-
ESQL_TYPE_METADATA
- See Also:
-
-
Constructor Details
-
BlockArrowFormatter
protected BlockArrowFormatter(DataType esqlType, org.apache.arrow.vector.types.Types.MinorType minorType)
-
-
Method Details
-
arrowField
-
nullValuesCount
-
addFieldNodes
public void addFieldNodes(Block block, boolean multivalued, List<org.apache.arrow.vector.ipc.message.ArrowFieldNode> nodes) Add Arrow field nodes for this block. Must be called beforeconvert(org.elasticsearch.compute.data.Block, boolean, java.util.List<org.apache.arrow.memory.ArrowBuf>, java.util.List<org.elasticsearch.xpack.esql.formatter.arrow.BlockArrowFormatter.BufWriter>). Override for nested types that contribute multiple nodes (e.g., struct). -
convert
public abstract void convert(Block block, boolean multivalued, List<org.apache.arrow.memory.ArrowBuf> bufs, List<BlockArrowFormatter.BufWriter> bufWriters) Convert a block into Arrow buffers.- Parameters:
block- the ESQL blockmultivalued- is this column multivalued? This block may not, but some blocks in that column are.bufs- arrow buffers, used to track sizesbufWriters- buffer writers, that will do the actual work of writing the data
-