Class InputTextReader
java.lang.Object
org.elasticsearch.xpack.esql.inference.InputTextReader
- All Implemented Interfaces:
Closeable,AutoCloseable,org.elasticsearch.core.Releasable
Helper class that reads text strings from a
BytesRefBlock.
This class is used by inference operators to extract text content from block data.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
InputTextReader
-
-
Method Details
-
readText
Reads the text string at the given position. Multiple values at the position are concatenated with newlines.- Parameters:
pos- the position index in the block- Returns:
- the text string at the position, or null if the position contains a null value
-
readText
Reads the text string at the given position.- Parameters:
pos- the position index in the blocklimit- the maximum number of value to read from the position- Returns:
- the text string at the position, or null if the position contains a null value
-
estimatedSize
public int estimatedSize()Returns the total number of positions (text entries) in the block. -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.elasticsearch.core.Releasable
-