Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-29737

Check if a SourceCatalog is sorted when calling `find`

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw
    • Labels:
      None

      Description

      During one of the pair coding sessions with Jim Bosch and Dan Taranu, we found that afw.table.SourceCatalog executes `find` method assuming it is sorted without really checking if the catalog is sorted. This ticket will include an explicit check and raise an error if `find` is called on an unsorted catalog.

        Attachments

          Issue Links

            Activity

            Hide
            kannawad Arun Kannawadi added a comment -

            Instead of assuming that the catalog is always sorted, the updated find method first performs a binary search hoping that the catalog is sorted, and if unsuccessful, performs a brute-force linear search before declaring it unsuccessful. This fixes the bug of not finding record IDs for unsorted catalog, but fails slower for sorted catalogs.

            Show
            kannawad Arun Kannawadi added a comment - Instead of assuming that the catalog is always sorted, the updated  find  method first performs a binary search hoping that the catalog is sorted, and if unsuccessful, performs a brute-force linear search before declaring it unsuccessful. This fixes the bug of not finding record IDs for unsorted catalog, but fails slower for sorted catalogs.
            Show
            kannawad Arun Kannawadi added a comment - Jenkins run:  https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/34014/pipeline
            Hide
            kannawad Arun Kannawadi added a comment -

            Thanks for the super quick review Jim. I'll merge it to master once the Jenkins run is successfully complete.

            Show
            kannawad Arun Kannawadi added a comment - Thanks for the super quick review Jim. I'll merge it to master once the Jenkins run is successfully complete.

              People

              Assignee:
              kannawad Arun Kannawadi
              Reporter:
              kannawad Arun Kannawadi
              Reviewers:
              Jim Bosch
              Watchers:
              Arun Kannawadi, Jim Bosch
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.