Hi

I have a storm query which, in SQL, essentially boils down to:

select foo.a, bar.b, max(foo.c) from foo, bar where foo.id = bar.id
group by a, b

This query is used to obtain a dataset used for display on a Launchpad
page - a table with navigation links for first/next/prev/last etc is
used; x records at a time are displayed.

In my business logic to grab the data using storm, I essentially do:

result = store.using(xxxx).find(yyyy).group_by(zzzz)
return result

This however causes an error:

storm FeatureError: Single aggregates aren't supported after a GROUP BY
clause

So it seems that using a view with navigation links on the table results
in an attempt to call count() on the resultset from the find() and this
is failing. Tracing the sql and executing this sql directly against the
db works just fine and produces the right data. But when using storm to
try and do the same thing it doesn't work.

I can make it work by doing:

result = store.using(xxxx).find(yyyy).group_by(zzzz)
return list(result)

But I really don't want to do this as it defeats the purpose of trying
to use an iterable result set.

Does anyone have any advice as to what I can do to make it work the way
I want?

Thanks in advance.



-- 
storm mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/storm

Reply via email to