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 WMS capabilities generation more efficient with regard to
dimensions, and calculating the distinct values of a time / elevation /
custom dimension.

In applying and cleaning up the patch I started to realize that there are a
few details making the patch not so straight forward as I originally
thought. So I would love to get some feedback before proceeding.

So the basic idea is to add a new hint called "DISTINCT" (or something
along those lines) and then have the jdbc feature sources add it as a
supported hint. When the hint is set queries to the back end will use the
"DISTINCT" keyword. Pretty straight forward but a few questions I am
struggling with.

1. Hint?

I guess the first question is whether a hint is the best way to approach
this. I am very open to alternatives here.

2. Feature ids

Second question is with regard to returned features from a distinct query.
A distinct query is really a derived result set in which any primary key of
the underlying table doesn't really make sense. However to return features
we need a fid. My thought here is just to return the default randomly
generated fid for features returned from a distinct query.

Thanks folks. Thoughts and feedback welcome.

-Justin

-- 
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to