Page MenuHomeSoftware Heritage

postgresql: Fix SQL query for origin_find_visit_by_date method
ClosedPublic

Authored by anlambert on Aug 30 2022, 2:38 PM.

Details

Summary

In that query, the interval alias was set for the visit column instead
of the date difference computation which could lead to wrong visit
being returned due to invalid results ordering.

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D8347 (id=30140)

Rebasing onto 57e5431cec...

Current branch diff-target is up to date.
Changes applied before test
commit d038240ce71e44210e381233107c7bf83946d455
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Aug 30 14:35:31 2022 +0200

    postgresql: Fix SQL query for origin_find_visit_by_date method
    
    In that query, the interval alias was set for the visit column instead
    of the date difference computation which could lead to wrong visit
    being returned due to invalid results ordering.

See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1659/ for more details.

This revision is now accepted and ready to land.Aug 30 2022, 3:05 PM