Describe the Issue
From this line it seems the sql query may return duplicate records.
Update: We do a distinctBy
here.
So the records are still distinct but we should add DISTINCT clause in the sql query instead.
Would you like to work on the issue?