For ENRICH with a WITH statement, the attributes it creates are handled differently from EVAL and GROK/DISSECT.
E.g. a query with... | ENRICH languages_policy ON a WITH name = language_name has an Enrich logical/physical plan, and the Expression for the language_name attribute is an Alias called name.
Weirdly, we need to handle the unaliased language_name ReferenceAttribute directly in PhysicalPlanOptimizer.ProjectAwayColumns. A similar hack is currently required to make the DependencyCheck work on LogicalPlans.
This should be refactored so that the attribute handling is analogous to EVAL and GROK/DISSECT.
For
ENRICHwith aWITHstatement, the attributes it creates are handled differently fromEVALandGROK/DISSECT.E.g. a query with
... | ENRICH languages_policy ON a WITH name = language_namehas anEnrichlogical/physical plan, and the Expression for thelanguage_nameattribute is an Alias calledname.Weirdly, we need to handle the unaliased
language_nameReferenceAttribute directly inPhysicalPlanOptimizer.ProjectAwayColumns. A similar hack is currently required to make the DependencyCheck work on LogicalPlans.This should be refactored so that the attribute handling is analogous to
EVALandGROK/DISSECT.