Closed timkrins closed 5 years ago
Hey @timkrins, thanks for the bug report! I think I was able to fix this, although I don't believe Arel supports anything other than a bare .over
, i.e. no PARTITION BY
. Should be live now.
See: https://github.com/camertron/scuttle-rb/pull/11 and https://github.com/camertron/scuttle-java/pull/3
Just noticed an issue with the parser and had to dig a little deeper into the ActiveRecord/Arel source to figure it out the solution.
Problem arose when using window functions in Postgres, and giving each of my results the row number:
Scuttle is reporting the Arel equivalent as:
1) It translates the named function incorrectly 2) It forgets about the count
Handwritten Arel that works correctly is:
Not a common one - but leaving this here in case any others run across a similar issue.
Thanks very much for the tool!