Class PlanAnonymizer
java.lang.Object
org.elasticsearch.xpack.esql.anonymizer.PlanAnonymizer
Thin facade over
AnonymizationContext. Each pipeline stage's tree is rendered via
plan.toString(NodeStringFormat.FULL, mapper) where the mapper is the context's
NodeStringMapper view — every nodeString override that mentions an identifier or
literal asks the mapper for the value to emit, and the mapper interns each one via the per-
submission token maps. This class also renders the schema artifact (which has its own format
requirements separate from the plan toString shape).-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionanonymize(LogicalPlan parsed, LogicalPlan analyzed, LogicalPlan optimized, PhysicalPlan physical) Anonymize whichever pipeline stages reached completion.static PlanAnonymizerforSubmission(String clusterUuid) One anonymizer per query submission so literal tokens don't carry across queries.
-
Method Details
-
forSubmission
One anonymizer per query submission so literal tokens don't carry across queries. -
anonymize
public PlanAnonymizer.AnonymizedPlans anonymize(LogicalPlan parsed, LogicalPlan analyzed, LogicalPlan optimized, PhysicalPlan physical) Anonymize whichever pipeline stages reached completion. Any of the four arguments may be null (e.g. parse failed → all null; analyze failed → only parsed non-null; etc.); the corresponding record field comes back empty. Schema is rendered from analyzed when available, else optimized (the parsed plan hasUnresolvedRelations with no resolved attributes, so it carries no useful schema).
-