Thanks Jody,

I've put up https://github.com/geotools/geotools/pull/519. I'm a little unsure how much of the tests it made sense to duplicate. Also, given that the current behavior is to truncate Dates to the second, I figured it was reasonable to print the extra info if it is present, but otherwise to act the same.

By the way, my use case involves splitting up ECQL filters and giving pieces of the filter to various Accumulo iterators. If there is a better way to be serializing and deserializing parts of an ECQL query, I'm open to doing things a better way.

Thanks in advance,

Jim

On 07/31/2014 07:35 PM, Jody Garnett wrote:
My three questions are

    1.  Is it reasonable to expect that ECQL.toCQL/toFilter should be
    inverses?


If it is reasonable if you supply a patch :) I figured it was reasonable and patched a couple of gaps here: https://jira.codehaus.org/browse/GEOT-4783

In particular you can review the patch https://github.com/geotools/geotools/commit/649853a304a4779ed86121151193ea0fe049f367 to see how I handled recognising part of a filter as being representable as ECQL, and then creating a method to output the ECQL.

       if (isInFilter(filter)) {
            return buildIN(filter, extraData);
       }
       // default to normal OR output
return FilterToTextUtil.buildBinaryLogicalOperator("OR", this, filter, extraData);

    2.  If my issue is a bug, can I submit a PR, etc?  Is
    there documentation about that process?


Yep, there is a CONTRIBUTING.md <https://github.com/geotools/geotools/blob/master/CONTRIBUTING.md>file (which is shown as a link when you issue a github pull request). Or see the home page about getting involved <http://geotools.org/getinvolved.html>.

    3.  Has anyone else run into this?  Is there a well-known work-around?


I don't think many people rely on ECQL.toCQL/toFilter being invertible. So lets just get it done.

--
Jody

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to