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

Modifies ColumnVisibility.normalize() to have no side effects #5115

Open
wants to merge 1 commit into
base: 2.1
Choose a base branch
from

Conversation

keith-turner
Copy link
Contributor

ColumnVisibility objects have an assoiciated parse tree. Normalizing a column visibility would change the parse tree in place. This would cause the parse tree to no longer match the expression, which would not matter for most operations on the parse tree. This side effect would also cause problems for multiple threads attempting to normalize a column visibility. This change creates a new parse tree during the normalization process and does not modify the existing one.

ColumnVisibility objects have an assoiciated parse tree. Normalizing a
column visibility would change the parse tree in place.  This would
cause the parse tree to no longer match the expression, which would
not matter for most operations on the parse tree.  This side effect
would also cause problems for multiple threads attempting to normalize
a column visibility.  This change creates a new parse tree during the
normalization process and does not modify the existing one.
@keith-turner keith-turner added this to the 2.1.4 milestone Nov 26, 2024
@dlmarion
Copy link
Contributor

PR looks good. I'm concerned that this could cause an issue for any user that is using the parse tree after calling flatten or normalize.

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