These are chat archives for linkedin/pinot

30th
Oct 2015
Greg Spurrier
@gregspurrier
Oct 30 2015 17:12
I'm trying to order the results of a group by, but the order by clause doesn't appear to be having any effect. select yearID, playerName, count(*) from baseballStats group by yearID, playerName order by yearID, playerName. What am I doing wrong?
Greg Spurrier
@gregspurrier
Oct 30 2015 17:18

Also, when I remove the group by, I'm finding that the secondary ordering isn't quite right:

curl -X POST -d '{"pql":"select yearID, playerName from baseballStats order by yearID, playerName"}' http://localhost:7000/query

{
  "selectionResults": {
    "columns": ["yearID", "playerName"],
    "results": [
      ["1871", "Caleb Clark"],
      ["1871", "Asahel"],
      ["1871", "Arthur Algernon"],
      ["1871", "Andrew Jackson"],
      ["1871", "Alfred L."],
      ["1871","Alfred James"],
      ["1871", "Albert Goodwill"],
      ["1871", "Albert G."],
      [ "1871", "Adrian Constantine"],
      ["1871", "Calvin Alexander" ]
    ]
  },
  "traceInfo": {},
  "numDocsScanned": 97889,
  "aggregationResults": [],
  "timeUsedMs": 7,
  "segmentStatistics": [],
  "exceptions": [],
  "totalDocs": 97889
}

Are there limitations on sorting? This is with a fresh clone of the repo from this morning, BTW.

Jean-Fran├žois Im
@jfim
Oct 30 2015 18:30
@gregspurrier Can you create a GitHub issue for that? It seems as if Pinot isn't doing the right thing there.
@gregspurrier Also, when you group by, the ordering is based on the value of the aggregation function rather than the order by clause (order by clause is actually ignored in that case).
Greg Spurrier
@gregspurrier
Oct 30 2015 18:46
@jfim thanks for the explanation. I'll create an issue for the plain sort case.
Jean-Fran├žois Im
@jfim
Oct 30 2015 21:02
@gregspurrier We've got a fix for it, by the way