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

Support and document support for dates/times in query expressions

    Details

    • Story Points:
      4
    • Sprint:
      DB_F19_10, DB_S20_12, DB_S20_01, DB_S20_02
    • Team:
      Data Access and Database

      Description

      I don't actually know how to pass a datetime into a query expression, or if that's possible.  Andy Salnikov, could you add support if it's missing, or document it if it's present?

       

      We may want to make support for this explicit (via built-in datetime or astropy time calls), to insulate us from changes to the database type used for datetimes (e.g. DM-15890).

        Attachments

          Issue Links

            Activity

            Hide
            salnikov Andy Salnikov added a comment -

            Jim Bosch, I am a bit confused what QueryDimensionRecordStorage.join() should return. Is it self._query? But that only has self.element.graph.required columns in it, which I understand not a full set of columns, so I can't use that subquery to select "other" columns?

            Show
            salnikov Andy Salnikov added a comment - Jim Bosch , I am a bit confused what QueryDimensionRecordStorage.join() should return. Is it self._query ? But that only has self.element.graph.required columns in it, which I understand not a full set of columns, so I can't use that subquery to select "other" columns?
            Hide
            jbosch Jim Bosch added a comment -

            `self._query` is fine. There are restrictions elsewhere that enforce that `QueryDimensionRecordStorage` is only used in the case where those are the only columns in that dimension at all.

            Show
            jbosch Jim Bosch added a comment - `self._query` is fine. There are restrictions elsewhere that enforce that `QueryDimensionRecordStorage` is only used in the case where those are the only columns in that dimension at all.
            Hide
            salnikov Andy Salnikov added a comment -

            Should be ready for review. I'm assigning it to Tim Jenness, Jim Bosch could you check that my fix for QueryBuilder looks reasonable.

            Kian-Tat Lim, there is on potential issue for you to review too, RFC says that ISO with time zone is supposed to be used but astropy does not support time zones. I mention that explicitly in the docs, but if we need timezone support we'll need another ticket.

            Show
            salnikov Andy Salnikov added a comment - Should be ready for review. I'm assigning it to Tim Jenness , Jim Bosch could you check that my fix for QueryBuilder looks reasonable. Kian-Tat Lim , there is on potential issue for you to review too, RFC says that ISO with time zone is supposed to be used but astropy does not support time zones. I mention that explicitly in the docs, but if we need timezone support we'll need another ticket.
            Hide
            tjenness Tim Jenness added a comment -

            Looks great. I think I can get on board with the `Tformat/value/scale` approach.

            Show
            tjenness Tim Jenness added a comment - Looks great. I think I can get on board with the `Tformat/value/scale` approach.
            Hide
            salnikov Andy Salnikov added a comment -

            Thanks for review, merged.

            Show
            salnikov Andy Salnikov added a comment - Thanks for review, merged.

              People

              • Assignee:
                salnikov Andy Salnikov
                Reporter:
                jbosch Jim Bosch
                Reviewers:
                Tim Jenness
                Watchers:
                Andy Salnikov, Fritz Mueller, Gregory Dubois-Felsmann, Jim Bosch, Robert Lupton, Tim Jenness
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel