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

Add support for non-aliased fields in ORDER BY clause

    XMLWordPrintable

Details

    • Story
    • Status: To Do
    • Resolution: Unresolved
    • None
    • Qserv
    • None

    Description

      Next clause

      SELECT f1 from Source as s ORDER BY s.id
      

      isn't supported by Qserv, indeed merge table has an id, not s.id column.

      Adding ORDER BY fields in SELECT clause using alias would solve this:

      SELECT f1, s.Id as __QSERV_ORDER_BY_1 from Source as s ORDER BY __QSERV_ORDER_BY_1
      

      Nevertheless SELECT * FROM resultTable ORDER BY __QSERV_ORDER_BY_1 query on mysql-proxy would have to be replaced with something like SELECT f1 FROM resultTable ORDER BY __QSERV_ORDER_BY_1 (this select would take all columns except the __QSERV_ORDER_BY ones).

      Attachments

        Issue Links

          Activity

            There are no comments yet on this issue.

            People

              Unassigned Unassigned
              jammes Fabrice Jammes
              Andy Salnikov, Fabrice Jammes, Jacek Becla (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Jenkins

                  No builds found.