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

Find function calls referenced in expression indexes #249

Merged
merged 3 commits into from
Apr 13, 2022

Conversation

msakrejda
Copy link
Contributor

I added a brand new test instead of modifying the existing CREATE
INDEX test; I can merge these if that makes more sense.

@msakrejda msakrejda requested review from lfittl and seanlinsley April 13, 2022 02:24
spec/lib/parse_spec.rb Outdated Show resolved Hide resolved
Copy link
Member

@lfittl lfittl left a comment

Choose a reason for hiding this comment

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

Nice! Thanks for tackling this.

spec/lib/parse_spec.rb Outdated Show resolved Hide resolved
expect(query.warnings).to eq []
expect(query.tables).to eq ['test']
expect(query.ddl_tables).to eq ['test']
expect(query.call_functions).to eq ['lower']
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if its also worth checking filter_columns here? (just to have that be deterministic, I'm actually not sure if it'd return an empty table with a column name for regular elements, or no columns at all?)

Copy link
Contributor Author

@msakrejda msakrejda Apr 13, 2022

Choose a reason for hiding this comment

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

I added filter_columns to the spec and added support for that. Is that what you meant? Maybe it's just my unfamiliarity with pg_query, but I don't quite follow your comment.

Copy link
Member

Choose a reason for hiding this comment

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

Yep, thats what I meant :)

spec/lib/parse_spec.rb Outdated Show resolved Hide resolved
spec/lib/parse_spec.rb Outdated Show resolved Hide resolved
@msakrejda msakrejda merged commit 5121692 into main Apr 13, 2022
@msakrejda msakrejda deleted the find-index-functions-in-expression-indexes branch April 13, 2022 18:17
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.

3 participants