The logical optimizer rules PushdownEval, PushdownRegexExtract and PushdownEnrich create temporary attributes when an EVAL, GROK/DISSECT or ENRICH is pushed past a SORT with conflicting names; e.g. SORT x | EVAL x = y essentially becomes EVAL $$x = x, x = y | SORT $$x | DROP $$x.
The temporary attribute $$x should be synthetic, but currently that results in inconsistent physical plans as the rule ProjectAwayColumns will wrongly eliminate this attribute from the execution plan.
The logical optimizer rules
PushdownEval,PushdownRegexExtractandPushdownEnrichcreate temporary attributes when anEVAL,GROK/DISSECTorENRICHis pushed past aSORTwith conflicting names; e.g.SORT x | EVAL x = yessentially becomesEVAL $$x = x, x = y | SORT $$x | DROP $$x.The temporary attribute
$$xshould be synthetic, but currently that results in inconsistent physical plans as the ruleProjectAwayColumnswill wrongly eliminate this attribute from the execution plan.