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

FIX: Redo period filtering to respect leaderboard date bounds #178

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

s3lase
Copy link
Contributor

@s3lase s3lase commented Jan 2, 2025

This change, ensures period filter works within the bounds of the leaderboard's configured date(s) if present. There is currently a bug in the relative period condition in the materialized view query which causes it to take precedence over the leaderboard's date range. Ideally, scores should always be constrained by the leaderboard's dates first, with the relative period filter applied afterward, if applicable.

This change ensures that the period filter respects the leaderboard's configured date bounds, if present.

For example, given a November 2024 leaderboard (i.e. from_date = 2024-11-01 and to_date = 2024-11-30) refreshed and queried on 2025-12-02:

  • all_time: No period window, only scores created from 2024-11-01 to 2024-11-30
  • yearly: Period starting from 2024-01-02, only scores created from 2024-11-01 to 2024-11-30
  • quarterly: Period starting from 2024-10-02, only scores created from 2024-11-01 to 2024-11-30
  • monthly: Period starting from 2024-12-02, no scores because leaderboard's to_date is earlier
  • weekly: Period starting from 2024-12-26, no scores because leaderboard's to_date is earlier
  • daily: Period starting from 2025-01-01, no scores because leaderboard's to_date is earlier

@s3lase s3lase force-pushed the fix/leaderboard-period-filter branch 2 times, most recently from d9b27ef to c22199c Compare January 2, 2025 14:44
Ensure period filter is limited to the bounds of the leaderboard's configured date if present.
@s3lase s3lase force-pushed the fix/leaderboard-period-filter branch from c22199c to ba0d78e Compare January 2, 2025 14:45
@s3lase s3lase changed the title FIX: Redo period filter for leaderboard scores FIX: Redo period filtering to respect leaderboard date bounds Jan 2, 2025
@s3lase s3lase marked this pull request as ready for review January 2, 2025 18:10
@s3lase s3lase requested a review from xfalcox January 2, 2025 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant