Skip to content

Conversation

nicktobey
Copy link
Contributor

This code is for an optimization that "pushes" filters deeper into the tree so that they're adjacent to the tables they modify.

I've simplified the logic in two ways:

  • Removed handling of IndexedTableAccess nodes. This analysis pass used to run after these nodes were generated, but now runs before, so this code path will never be hit. Removing this logic makes it easier to make future changes to IndexedTableAccess

  • Removed the withTable subfunction, which never actually does anything, because the only table it will attempt to assign to a ResolvedTable is the table already on the node. This was likely leftover from a previous cleanup.

This code is for an optimization that "pushes" filters deeper into the tree so that they're adjacent to the tables they modify.

I've simplified the logic in two ways:

- Removed handling of `IndexedTableAccess` nodes. This analysis pass used to run after these nodes were generated, but now runs before, so this code path will never be hit. Removing this logic makes it easier to make future changes to `IndexedTableAccess`

- Removed the `withTable` subfunction, which never actually does anything, because the only table it will attempt to assign to a ResolvedTable is the table already on the node. This was likely leftover from a previous cleanup.
@nicktobey nicktobey marked this pull request as ready for review August 11, 2023 20:37
@nicktobey nicktobey requested a review from max-hoffman August 11, 2023 20:37
Copy link
Contributor

@max-hoffman max-hoffman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nicktobey nicktobey merged commit cee5b01 into main Aug 11, 2023
@nicktobey nicktobey deleted the nicktobey/pushfilters branch August 11, 2023 23:25
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

Successfully merging this pull request may close these issues.

2 participants