Hi
I think I have found a bug in storm's Count() implementation. I can't
see anything obvious already reported as a bug and thought I'd check
here before raising a new bug.
Basically, doing this (warning, pseudo code):
store.execute(
Select(columns=[Count((a,b,c), distinct=True)],
tables=[A],
where=xxxx)
)
results in sql like:
select count(distinct a,b,c) from A where xxx
>From my understanding, the above sql is not valid for Postgres, although
it works with other databases like mysql etc. What Postgres wants is this:
select count(distinct (a,b,c)) from A where xxx
Note the extra () around the column list. I think also the above may be
more correct from an sql standpoint?
At the moment, using storm's current implementation of Count() you get
the following error:
ProgrammingError: function count(integer, integer, integer, integer)
does not exist LINE 1: SELECT COUNT(DISTINCT a,b,c) ... HINT: No
function matches the given name and argument types. You might need to
add explicit type casts.
I have fixed it locally by providing my own implementation of Count().
Am I correct in assuming this is a bug? If so, I'll go ahead and raise a
bug in Launchpad.
--
storm mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/storm