Open lsh opened 1 year ago
Yeah good catch!
This may be kind of a pain in the neck to fix. I've envisioned a "naming type" to which one could apply "inputs", say, the name from the json source, and "context", components that led to this (e.g. you see these reflected in AggregateTransformOpsVariant0ItemVariant0
). Then one could "resolve" a collection of these types to find unique names with only the required amount of context.
For enum variants, each variant is effectively processed individually. We would want this sort of placeholder name generated for each; then we would resolve to a final name when we had the full set in hand. I expect we'd use the "type-state" pattern.
I would consider that totally fair as a "wontfix" criteria. Either way, thanks for looking into it!
In the Vega example, an enum with
__count__
andcount
outputs:I'm looking into whether
__count__
is a spec bug and not meant to be exposed 😅 , but from a code gen perspective figuring out what to do with these collisions is probably worthwhile.