Class XContentRowEncoder
java.lang.Object
org.elasticsearch.xpack.esql.inference.XContentRowEncoder
- All Implemented Interfaces:
Closeable,AutoCloseable,EvalOperator.ExpressionEvaluator,org.elasticsearch.core.Releasable
Encodes rows into an XContent format (JSON,YAML,...) for further processing.
Extracted columns can be specified using
EvalOperator.ExpressionEvaluator-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionlongvoidclose()Process the provided Page and encode its rows into a BytesRefBlock containing XContent-formatted rows.toString()static XContentRowEncoder.FactoryyamlRowEncoderFactory(Map<ColumnInfoImpl, EvalOperator.ExpressionEvaluator.Factory> fieldsEvaluatorFactories) Creates a factory for YAML XContent row encoding.
-
Method Details
-
yamlRowEncoderFactory
public static XContentRowEncoder.Factory yamlRowEncoderFactory(Map<ColumnInfoImpl, EvalOperator.ExpressionEvaluator.Factory> fieldsEvaluatorFactories) Creates a factory for YAML XContent row encoding.- Parameters:
fieldsEvaluatorFactories- A map of column information to expression evaluators.- Returns:
- A Factory instance for creating YAML row encoder for the specified column.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.elasticsearch.core.Releasable
-
eval
Process the provided Page and encode its rows into a BytesRefBlock containing XContent-formatted rows.- Specified by:
evalin interfaceEvalOperator.ExpressionEvaluator- Parameters:
page- The input Page containing row data.- Returns:
- A BytesRefBlock containing the encoded rows.
-
baseRamBytesUsed
public long baseRamBytesUsed()- Specified by:
baseRamBytesUsedin interfaceEvalOperator.ExpressionEvaluator
-
fieldNames
-
toString
-