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

Remove redundant field CommentLike.post_id #4749

Closed
wants to merge 22 commits into from

Conversation

dullbananas
Copy link
Collaborator

@dullbananas dullbananas commented May 28, 2024

Required by requires #4459

@@ -59,7 +59,7 @@ impl VoteView {

comment_like::table
.inner_join(person::table)
.inner_join(post::table)
.inner_join(comment::table.inner_join(post::table))
Copy link
Member

Choose a reason for hiding this comment

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

Is there a difference in logic or performance if we put each of these individually on the top level chain? i.e.

comment_like::table
    .inner_join(person::table)
    .inner_join(comment::table)
    .inner_join(post::table)
    // etc.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There should be no difference because only 5 tables are joined, and the join collapse limit is set to 11, which means the database ignores the given join order

@dessalines dessalines marked this pull request as draft May 29, 2024 14:04
@dessalines dessalines added this to the 0.20.0 milestone May 29, 2024
@dessalines
Copy link
Member

dessalines commented May 29, 2024

Lets mark as draft until 0.20.0, because its a breaking API change.

@dullbananas dullbananas changed the title Remove redundant fields PersonPostAggregatesForm.published and CommentLike.post_id Remove redundant field CommentLike.post_id Jun 5, 2024
@dessalines dessalines marked this pull request as ready for review September 13, 2024 23:44
@dessalines
Copy link
Member

I'll mark as ready to review, since we're merging breaking changes now.

@dessalines
Copy link
Member

The migration for this one is dependent on #4459 , so luckily the CI will catch this until that one gets merged.

@Nutomic
Copy link
Member

Nutomic commented Oct 17, 2024

Included in #5122

@Nutomic Nutomic closed this Oct 17, 2024
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.

4 participants