Skip to content

Duplicate fixup and removal of tasks and TG tasks from report#53

Merged
jmgasper merged 1 commit intomasterfrom
develop
Feb 25, 2026
Merged

Duplicate fixup and removal of tasks and TG tasks from report#53
jmgasper merged 1 commit intomasterfrom
develop

Conversation

@jmgasper
Copy link
Collaborator

No description provided.

@jmgasper jmgasper merged commit 276c548 into master Feb 25, 2026
5 of 6 checks passed
-- filter by challenge status
AND ($3::text[] IS NULL OR c.status::text = ANY($3::text[]))
-- exclude task challenge types from this report
AND LOWER(ct.name) NOT IN ('task', 'topgear task')

Choose a reason for hiding this comment

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

[⚠️ performance]
The use of LOWER(ct.name) NOT IN ('task', 'topgear task') could potentially lead to performance issues if the name column is not indexed or if there are a large number of rows. Consider ensuring that there is an index on LOWER(ct.name) to optimize this filter.

),
registrants AS (
-- keep one submitter resource row per challenge/member
SELECT DISTINCT ON (fc.id, res."memberId")

Choose a reason for hiding this comment

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

[⚠️ correctness]
Using SELECT DISTINCT ON with multiple columns can lead to non-deterministic results if the ordering is not clear or if there are ties. Ensure that the ORDER BY clause is correctly defined to handle ties deterministically.

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.

1 participant