Skip to content

Conversation

@seanmcgary
Copy link
Member

@seanmcgary seanmcgary commented Jul 16, 2025

Description

Refactoring date-suffixed rewards table names into one combined table. For example,

gold_10_avs_od_reward_amounts_2025_01_27
                                           --------> rewards_gold_10_avs_od_reward_amounts
gold_10_avs_od_reward_amounts_2025_01_28
                                        

This PR also removes rewards_staging table, as it became redundant with the rewards_final.

Type of change

  • Refactor (non-breaking change which does not add or remove functionality)

How Has This Been Tested?

  1. ran this code on the full snapshot and let it run until the new rewards was generated.
  2. ran this code on the slim snapshot and run rewards from 2024 and then from 2025.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@seanmcgary seanmcgary requested a review from a team as a code owner July 16, 2025 15:36
@serichoi65 serichoi65 force-pushed the sm-rewardsTablePerfClone branch 2 times, most recently from e86ff7a to 61c79ba Compare August 4, 2025 05:18
@serichoi65 serichoi65 force-pushed the sm-rewardsTablePerfClone branch 2 times, most recently from a3e054b to 8afcef0 Compare August 22, 2025 18:59
@serichoi65 serichoi65 changed the title WIP: rewards perf updates refactor: combine date-suffixed rewards table into one table Aug 22, 2025
@serichoi65 serichoi65 force-pushed the sm-rewardsTablePerfClone branch from f2e24e6 to d31e3ca Compare August 26, 2025 20:42
@serichoi65 serichoi65 force-pushed the sm-rewardsTablePerfClone branch 3 times, most recently from 75f2076 to c1ceb21 Compare September 22, 2025 00:42
@serichoi65 serichoi65 force-pushed the sm-rewardsTablePerfClone branch from 9445144 to f013732 Compare September 22, 2025 21:51
@serichoi65 serichoi65 force-pushed the sm-rewardsTablePerfClone branch from 941b2f4 to 08d10c1 Compare October 1, 2025 19:58
seanmcgary and others added 16 commits October 14, 2025 15:50
refactor all tables and add tests

stuff
hopefully working

chnge back to do nothing

rewards

working?

remove unused function

rename migration file
simplify code

fix test

remove old staging tables
delta from its persistent tables

remove gold_staging

remove on conflict

move staging data to gold_table;

remove filter id and optimize left join with gold table

group by

don't remove temp tables

fix missing earners

cutoffdate

fix table 5

fix table 4 and 5

remove restrictive filter on table 5

fix

fix

fix temp file

fix table 2

fix table 5

table 5

conservative table 5
@serichoi65 serichoi65 force-pushed the sm-rewardsTablePerfClone branch from 9dad0ee to 66bb0cf Compare October 14, 2025 19:50
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