Fix page_engagement_views_report: correct uniqueness test grain and platform user joins#1938
Closed
Copilot wants to merge 2 commits intopage-engagement-views-reportfrom
Closed
Fix page_engagement_views_report: correct uniqueness test grain and platform user joins#1938Copilot wants to merge 2 commits intopage-engagement-views-reportfrom
Copilot wants to merge 2 commits intopage-engagement-views-reportfrom
Conversation
…on shared block titles Co-authored-by: quazi-h <59845076+quazi-h@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add page engagement views report model
Fix page_engagement_views_report: correct uniqueness test grain and platform user joins
Feb 23, 2026
Contributor
|
@copilot is this PR still relevant to the branch it is being merged into? |
Contributor
Author
No, this PR is no longer relevant. The base branch ( Additionally, merging this PR as-is would be harmful: it would delete the This PR can be closed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
page_engagement_views_reporthad two correctness issues: thedim_userjoin only matchedmitxonlineusers, dropping all others, and the uniqueness test usedunit_titlewhich is not unique across blocks (two verticals in the same course can share the same title).Changes
mitxonline_openedx_user_idjoin with platform-conditional OR join coveringmitxonline,edxorg,mitxpro, andresidentialblock_category = 'sequential'tosubsection_blocksCTE andblock_category = 'chapter'tosection_blocksCTE to avoid cross-block-type join pollutionGROUP BY:int__combined__course_runsalready has uniquecourserun_readable_id; the aggregation was pure overheadunit_block_id(unit_blocks.block_id) to the SELECT and switched the compound uniqueness test fromunit_titletounit_block_id, which is the actual surrogate key for the block🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.