Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-16631

[C++] Support order by derived column

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • C++

    Description

      You can't do the equivalent of

      SELECT x, y FROM table ORDER BY x * y ASC;
      

      because sorting requires a named column AND because sorting is only done in a SinkNode. You can project to

      {x, y, x*y}

      then sort on x*y, but you can't then project back to

      {x, y}

      on the sorted data because that's a new ExecPlan and order is not preserved. In R we have to handle this outside of an ExecPlan.

      Attachments

        Activity

          People

            Unassigned Unassigned
            npr Neal Richardson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: