All Implemented Interfaces:
NamedWriteable, Writeable, Resolvable, EvaluatorMapper, BlockLoaderExpression

public class FieldExtract extends EsqlScalarFunction implements BlockLoaderExpression
Extracts a single sub-field from a flattened field root as keyword.

The second argument is the literal name of a flattened sub-field, that is, exactly the dotted key as it is stored in doc values for the flattened root (for example "host.name").

When the path is a foldable literal key on a real flattened FieldAttribute, the call is fused into the field load via BlockLoaderExpression. The keyed sub-field's doc values are read directly instead of materializing the whole flattened JSON and re-parsing it per row. The path is the flat sub-field name as is (no parsing), so any path that passes verifier-time validation is eligible for pushdown.