[MonetDB-users] PF: "Group By" work-around no longer working?

Hi all, I am using MonetDB Nov2008-SP1 release with XQuery. I need to group the results that I retrieve by file. Since XQuery does not have a 'group by' function as in SQL, I was using the workaround of Borkar and Carey, see http://www.idealliance.org/proceedings/xml04/papers/229/XQueryExtensionsFina... This was working fine for the version of half year ago, but with the latest release the trick with 'distinct-values' is no longer working. The results are returned not grouped by file, e.g. {A,A,A}, {B,B}, {C,C,C,C}, etc. Is this true for other users as well? Am I going crazy? ;) Could someone please test whether this still works? Thanks and regards, junte

A small update:
It is still working, but the behavior in MPS and Algebra is completely
different in terms of retrieval. In other words, when I use the same
query, I get completely different results in MPS and Algebra.
When the 'group by' is used, the results are sorted by relevance
(score) in MPS though still grouped by file and its highest ranking
element. I mean with 'highest ranking element' that the groups are
also sorted by relevance, because the position of the first (and thus
most relevant) member of the group in the hit list is also the
position of that group. Less relevant results are grouped with that
result.
In Algebra, the results are returned alphanumerically by the grouping
variable (in this case the file name), which basically would make the
run a batch retrieval thing. And nobody wants that anymore nowadays!
So I don't want it either. ;)
I cannot run MPS properly (only works the 1st time and then I get the
error as described in this bug report:
http://sourceforge.net/tracker/index.php?func=detail&aid=2462165&group_id=56967&atid=482468),
so I cannot fall back to MPS.
Should I file a bug report? Or is there a work-around for this?
junte
On Wed, Jan 14, 2009 at 12:59 AM, jz@uva
Hi all,
I am using MonetDB Nov2008-SP1 release with XQuery.
I need to group the results that I retrieve by file. Since XQuery does not have a 'group by' function as in SQL, I was using the workaround of Borkar and Carey, see http://www.idealliance.org/proceedings/xml04/papers/229/XQueryExtensionsFina...
This was working fine for the version of half year ago, but with the latest release the trick with 'distinct-values' is no longer working.
The results are returned not grouped by file, e.g. {A,A,A}, {B,B}, {C,C,C,C}, etc.
Is this true for other users as well? Am I going crazy? ;) Could someone please test whether this still works?
Thanks and regards, junte

Hi Junte, Without query I cannot really help you. I can only say, that the Algebra variant should be working (also for what you call group-by queries). My guess is that you implicitly rely on some implementation defined order in MPS (-- e.g., the order of distinct-values is implementation defined and may vary for the Algebra variant). I would suggest to make the output ordering you are interested in explicit by using XQuery's ORDER BY construct. Jan On Jan 14, 2009, at 03:15, jz@uva wrote:
A small update:
It is still working, but the behavior in MPS and Algebra is completely different in terms of retrieval. In other words, when I use the same query, I get completely different results in MPS and Algebra.
When the 'group by' is used, the results are sorted by relevance (score) in MPS though still grouped by file and its highest ranking element. I mean with 'highest ranking element' that the groups are also sorted by relevance, because the position of the first (and thus most relevant) member of the group in the hit list is also the position of that group. Less relevant results are grouped with that result.
In Algebra, the results are returned alphanumerically by the grouping variable (in this case the file name), which basically would make the run a batch retrieval thing. And nobody wants that anymore nowadays! So I don't want it either. ;)
I cannot run MPS properly (only works the 1st time and then I get the error as described in this bug report: http://sourceforge.net/tracker/index.php?func=detail&aid=2462165&group_id=56967&atid=482468) , so I cannot fall back to MPS.
Should I file a bug report? Or is there a work-around for this?
junte
On Wed, Jan 14, 2009 at 12:59 AM, jz@uva
wrote: Hi all,
I am using MonetDB Nov2008-SP1 release with XQuery.
I need to group the results that I retrieve by file. Since XQuery does not have a 'group by' function as in SQL, I was using the workaround of Borkar and Carey, see http://www.idealliance.org/proceedings/xml04/papers/229/XQueryExtensionsFina...
This was working fine for the version of half year ago, but with the latest release the trick with 'distinct-values' is no longer working.
The results are returned not grouped by file, e.g. {A,A,A}, {B,B}, {C,C,C,C}, etc.
Is this true for other users as well? Am I going crazy? ;) Could someone please test whether this still works?
Thanks and regards, junte
------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- Jan Rittinger Lehrstuhl Datenbanken und Informationssysteme Wilhelm-Schickard-Institut für Informatik Eberhard-Karls-Universität Tübingen http://www-db.informatik.uni-tuebingen.de/team/rittinger
participants (2)
-
Jan Rittinger
-
jz@uva