Re: [Geotools-devel] distinct query hint

2013-04-26 Thread Andrea Aime
On Thu, Apr 25, 2013 at 9:37 PM, Justin Deoliveira wrote: > >> Right. Sorry, i seem a bit slow after vacation, should have seen that :) > Aaah vacations... should have one of those sooner or later :-p Cheers Andrea -- == GeoServer training in Milan, 6th & 7th June 2013! Visit http://geoserve

Re: [Geotools-devel] distinct query hint

2013-04-25 Thread Justin Deoliveira
On Thu, Apr 25, 2013 at 3:04 AM, Andrea Aime wrote: > On Thu, Apr 25, 2013 at 12:51 AM, Justin Deoliveira > wrote: > >> So indeed, this functionality is implemented. However, unfortunately it >> is only exposed api wise through ContentFeatureSource, as FeatureSource >> doesn't have an accepts met

Re: [Geotools-devel] distinct query hint

2013-04-25 Thread Andrea Aime
On Thu, Apr 25, 2013 at 12:51 AM, Justin Deoliveira wrote: > So indeed, this functionality is implemented. However, unfortunately it is > only exposed api wise through ContentFeatureSource, as FeatureSource > doesn't have an accepts method. Which is ok for my use case, i will just > check for CFS

Re: [Geotools-devel] distinct query hint

2013-04-24 Thread Justin Deoliveira
So indeed, this functionality is implemented. However, unfortunately it is only exposed api wise through ContentFeatureSource, as FeatureSource doesn't have an accepts method. Which is ok for my use case, i will just check for CFS for the optimization and fall back to the current behaviour if not.

Re: [Geotools-devel] distinct query hint

2013-04-24 Thread Justin Deoliveira
Ahhh... i figured there might something out there... thanks Andrea. I am definitely not tied to hints. I'll explore the UniqueVisitor approach and report back. Thanks folks! On Wed, Apr 24, 2013 at 8:34 AM, Andrea Aime wrote: > On Tue, Apr 23, 2013 at 10:40 PM, Justin Deoliveira > wrote: > >> H

Re: [Geotools-devel] distinct query hint

2013-04-24 Thread Andrea Aime
On Tue, Apr 23, 2013 at 10:40 PM, Justin Deoliveira wrote: > Hi all, > > Recently a client of ours forwarded along an initial patch that added > support for a query hint to do "distinct" queries. In this context > "distinct" implies the same semantics as the "distinct" keyword as > supported by mo

Re: [Geotools-devel] distinct query hint

2013-04-24 Thread Justin Deoliveira
Thanks Jody. The problem is that by including ID's in the query distinct becomes useless because by definition ID's are unique. For distinct to work and be of any use you actually have to skip the ID's . So to make what you suggest work we would have to do multiple queries which would sort of def

Re: [Geotools-devel] distinct query hint

2013-04-23 Thread Jody Garnett
Well the hint makes perfect sense … assume there are no duplicates unless that "hint" is there to advise you that: a) there are duplicates b) how to handle them As for how to handle them - the query pulls back a feature with the same "id" … that happen to differ based on the contents of a join.

[Geotools-devel] distinct query hint

2013-04-23 Thread Justin Deoliveira
Hi all, Recently a client of ours forwarded along an initial patch that added support for a query hint to do "distinct" queries. In this context "distinct" implies the same semantics as the "distinct" keyword as supported by most relational databases. The end use case of which is to make GeoServer