Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-44875: Handle ambiguous calibration lookups on older postgres #1029

Closed
wants to merge 2 commits into from

Commits on Jun 25, 2024

  1. Fix order_by with dataID/dataset queries on postgres

    Fix an issue where using order_by in the new query system for a data ID query or dataset query would sometimes fail with the postgres error "SELECT DISTINCT ON expressions must match initial ORDER BY expressions".
    
    This was occurring because the data ID de-duplication logic sometimes uses DISTINCT ON.
     Postgres requires that the leftmost ORDER BY expressions match the DISTINCT ON clause, and we were not enforcing that.
    dhirving committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    c818712 View commit details
    Browse the repository at this point in the history
  2. Handle ambiguous calibration lookups on older postgres

    For Postgres older than version 16, we now throw an error for find-first calibration searches instead of silently returning a potentially-incorrect result.   This is similar to the behavior of the old query system.
    
    The query requires the ANY_VALUE aggregate function to generate the validity match count column used by postprocessing to check for ambiguous results.  This function is not available on older Postgres.
    dhirving committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    7a73223 View commit details
    Browse the repository at this point in the history