Skip to content

Conversation

@rishabhtc
Copy link
Collaborator

…end dates from challenge phases

registration_end AS (
SELECT
cp."challengeId" AS challenge_id,
MAX(COALESCE(cp."actualEndDate", cp."scheduledEndDate")) AS registration_end_date
Copy link

Choose a reason for hiding this comment

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

[⚠️ correctness]
Using MAX(COALESCE(cp."actualEndDate", cp."scheduledEndDate")) to determine the registration_end_date assumes that the maximum of these dates is always the correct end date. Consider whether this logic accurately reflects the business rules, as it may not account for scenarios where the scheduled end date should take precedence over the actual end date.

submission_end AS (
SELECT
cp."challengeId" AS challenge_id,
MAX(COALESCE(cp."actualEndDate", cp."scheduledEndDate")) AS submission_end_date
Copy link

Choose a reason for hiding this comment

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

[⚠️ correctness]
Using MAX(COALESCE(cp."actualEndDate", cp."scheduledEndDate")) to determine the submission_end_date assumes that the maximum of these dates is always the correct end date. Ensure this logic aligns with the intended business rules, as it may not handle cases where the scheduled end date should override the actual end date.

@jmgasper jmgasper merged commit d861c26 into develop Jan 6, 2026
4 of 5 checks passed
@jmgasper
Copy link
Contributor

jmgasper commented Jan 6, 2026

Looks good to me, thanks

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