rails/rails — pull request #13236 by pftg (2013-12-08 23:25:09+00:00)
Title: Fix type cast on group sum with custom expression

For PG adapters with custom expression and grouped result
of aggregate functions have not found correct column type
for it. Extract column type from query result.

Closes: #13230