Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Fix Version/s: 1.1.0
    • Component/s: API
    • Labels:
      None

      Description

      I think we should switch to standard ORDER BY x [DESC] syntax, for several reasons.

      First, because ORDER [DESC] is not very readable. By that I mean, you have no idea what it means unless you cross reference with the CF definition.

      Second, because it's not a sufficiently better fit than the SQL syntax to justify inventing our own.

      Third (and this is the big one) I strongly suspect that we're going to start supporting at least limited run-time ordering in the near future, and this gives us some future proofing while working reasonably well in the meantime: we can simply reject with IRE ORDER BY requests that aren't compatible with the comparator, similarly to what we used to do with unindexed WHERE expressions. (Which is also a good example of us being dragged kicking and screaming into being more flexible at query time...)

      1. 3925.txt
        4 kB
        Sylvain Lebresne

        Activity

        Hide
        Sylvain Lebresne added a comment -

        Ok, I can get convinced by that. Of course the only downside is that to start with, there will be no choice on which column you can do the ORDER BY on, which may feel a little weird at first. Anyway, patch attached to do the change. It's rather minimal since it really just change the syntax and validate that you've picked up the right column. The exact syntax accepted is "ORDER BY x (ASC | DESC)?".

        Show
        Sylvain Lebresne added a comment - Ok, I can get convinced by that. Of course the only downside is that to start with, there will be no choice on which column you can do the ORDER BY on, which may feel a little weird at first. Anyway, patch attached to do the change. It's rather minimal since it really just change the syntax and validate that you've picked up the right column. The exact syntax accepted is "ORDER BY x (ASC | DESC)?".
        Hide
        Jonathan Ellis added a comment - - edited

        +1

        Show
        Jonathan Ellis added a comment - - edited +1
        Hide
        Sylvain Lebresne added a comment -

        Committed (to 1.1.0 since we agreed CQL3 is excluded from the freeze given it's beta nature), thanks.

        Show
        Sylvain Lebresne added a comment - Committed (to 1.1.0 since we agreed CQL3 is excluded from the freeze given it's beta nature), thanks.

          People

          • Assignee:
            Sylvain Lebresne
            Reporter:
            Jonathan Ellis
            Reviewer:
            Jonathan Ellis
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development