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

Use LinkableSpecSet in WhereFilterSpec #1335

Merged
merged 3 commits into from
Jul 17, 2024
Merged

Conversation

plypaul
Copy link
Contributor

@plypaul plypaul commented Jul 15, 2024

In WhereFilterSpec, the field linkable_specs can't be used with SerializableDataclass since it's an interface. This PR changes that field to a LinkableSpecSet.

…WhereFilterSpec`.

This allows it to be serializable.
@cla-bot cla-bot bot added the cla:yes label Jul 15, 2024
Copy link

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@plypaul plypaul force-pushed the p--query-resolution-perf--09 branch from e35d7d1 to 24758ee Compare July 15, 2024 22:12
@plypaul plypaul marked this pull request as ready for review July 16, 2024 21:06
Copy link
Contributor

@courtneyholcomb courtneyholcomb left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -61,7 +66,7 @@ def merge(self, other: WhereFilterSpec) -> WhereFilterSpec: # noqa: D102
return WhereFilterSpec(
where_sql=f"({self.where_sql}) AND ({other.where_sql})",
bind_parameters=self.bind_parameters.combine(other.bind_parameters),
linkable_specs=ordered_dedupe(self.linkable_specs, other.linkable_specs),
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the ordering matter from the previous code? Just checking since it looks like it was removed in the new code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The .dedupe() call is actually ordered, so it should be the same.

@plypaul plypaul merged commit 5bc927b into main Jul 17, 2024
15 checks passed
@plypaul plypaul deleted the p--query-resolution-perf--09 branch July 17, 2024 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants