Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Column expression with GetItem(Identity, Field) #1320

Open
gatesn opened this issue Nov 15, 2024 · 0 comments
Open

Replace Column expression with GetItem(Identity, Field) #1320

gatesn opened this issue Nov 15, 2024 · 0 comments

Comments

@gatesn
Copy link
Contributor

gatesn commented Nov 15, 2024

I would also pull this out into a function that walks expression trees:

    /// Accumulate all field references from this expression and its children in the provided set
    fn collect_references<'a>(&'a self, _references: &mut HashSet<&'a Field>) {}

    /// Accumulate all field references from this expression and its children in a new set
    fn references(&self) -> HashSet<&Field> {
        let mut refs = HashSet::new();
        self.collect_references(&mut refs);
        refs
    }

It's defined as exactly as the set of X where GetItem(Identity, X) exists in the expression tree.

And call it field_references instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant