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

Rewrite butler registry.queries subpackage

    XMLWordPrintable

    Details

      Description

      The need for a near-complete rewrite of the queries subpackage has been building for a long time; there are simply enough major changes (over)due that it makes more sense to start a new subpackage, copy/move what's worth keeping (the expression parsing and validation, at least) there, and work on the new system until it's ready to replace the old one.

      Motivations include:

      • Making query result objects that are serializable (via pydantic) and that do not have SQLAlchemy objects embedded in them, so they can be used in RemoteRegistry (with transformation to SQLAlchemy done only just before execution in SqlRegistry).
      • Making use of the not-really-new-anymore pairwise spatial-overlap tables, for performance, to address DM-31583, and to remove the need for post-query spatial filtering.
      • Adding support for user-uploaded data IDs (sets the stage for data ID files on the command-line and new QG-gen algorithms).
      • Making spatial joins user-controllable, to finally really fix QG generation limitations in jointcal, FGCM, etc.
      • Separating "dataset constraint subquery" logic from "dataset search query" logic, and ensuring the WHERE constraints appear in the optimal place in each (optimizes https://lsstc.slack.com/archives/C01FBUGM2CV/p1631220754411100?thread_ts=1631203913.392200&cid=C01FBUGM2CV)
      • Finally making calibration lookups vectorizable.
      • Making result objects compatible with the new container ABCs to be introduced on DM-30332.
      • Adding frequently-requested support for "what dataset types are in these collections" queries.

      This has been on my radar for a ~year, but it got preempted by the no-work-found problem and stalled by the introduction of RemoteRegistry, which torpedoed my original prototype.  But I think I have a solid enough idea now to try again.

        Attachments

          Issue Links

            Activity

            Hide
            salnikov Andy Salnikov added a comment -

            I'd be super-amazed myself I was planning to work on schema migrations today, so there is little chance I can finish big review by tomorrow.

            Show
            salnikov Andy Salnikov added a comment - I'd be super-amazed myself I was planning to work on schema migrations today, so there is little chance I can finish big review by tomorrow.
            Hide
            jbosch Jim Bosch added a comment -

            Thanks for the hand-holding: I've merged daf_relation, tagged it w.2022.50, added the dependency to daf_butler's pyproject.toml, and the ctrl_mpexec PR build now succeeds. I think that means the PyPI stuff at least mostly worked.

            Show
            jbosch Jim Bosch added a comment - Thanks for the hand-holding: I've merged daf_relation, tagged it w.2022.50, added the dependency to daf_butler's pyproject.toml, and the ctrl_mpexec PR build now succeeds. I think that means the PyPI stuff at least mostly worked.
            Hide
            tjenness Tim Jenness added a comment -

            PyPI: https://pypi.org/project/lsst-daf-relation/

            Next time you are fiddling with the package you need to fix the lack of readme content.

            Show
            tjenness Tim Jenness added a comment - PyPI: https://pypi.org/project/lsst-daf-relation/ Next time you are fiddling with the package you need to fix the lack of readme content.
            Hide
            salnikov Andy Salnikov added a comment -

            Between Tim and me all packages have been reviewed now, marking the ticket as reviewed.

            Show
            salnikov Andy Salnikov added a comment - Between Tim and me all packages have been reviewed now, marking the ticket as reviewed.
            Hide
            jbosch Jim Bosch added a comment - - edited

            I believe I've now addressed all review comments and the GitHub Actions checks are green (including codecov, thanks to review-inspired new unit test nevermind, it's still ever so slightly red; just took a while to come in, I guess). I've kicked off a final Jenkins run to check that my rebasing didn't break anything, and will merge tomorrow morning if that succeeds.

            Show
            jbosch Jim Bosch added a comment - - edited I believe I've now addressed all review comments and the GitHub Actions checks are green ( including codecov, thanks to review-inspired new unit test nevermind, it's still ever so slightly red; just took a while to come in, I guess). I've kicked off a final Jenkins run to check that my rebasing didn't break anything, and will merge tomorrow morning if that succeeds.

              People

              Assignee:
              jbosch Jim Bosch
              Reporter:
              jbosch Jim Bosch
              Reviewers:
              Andy Salnikov, Tim Jenness
              Watchers:
              Andy Salnikov, Jim Bosch, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.