I've put this in a bug report
https://osgeo-org.atlassian.net/browse/GEOT-5722 so we don't forget about
it - current best work around is to quote the attribute name or use a
longer name

Ian



On 7 May 2017 at 09:22, Suresh Prajapati <sureshpraja1...@gmail.com> wrote:

> Hello everyone,
>
> I am querying a simple feature type schema: r:Long:index=join,*g:Point:sri
> d=4326,di:Integer:index=join,al:Float,s:Float,b:Float,an:
> Float,he:Float,ve:Float,t:Float,m:Boolean,i:Boolean,ts:Long;
> geomesa.table.sharing='true',geomesa.indices='attr:4:3,
> records:2:3,z2:3:3',geomesa.table.sharing.prefix='\\u0001'
>
> with the query expression: r = 31 AND di = 5 AND BBOX(g, -38.857822,
> -76.111145, -74.64091, -38.61907) AND al <= 39.407307 AND s <= 1.6442835
> AND b <= 83.14717 AND an <= 87.0774 AND he <= 40.89476 AND ve <= 88.761566
> AND t <= 44.786507 AND m = true AND i = true.
>
> but it throws an exception saying Encountered "t" at line 1, column 195.
>
> Here is my exception log detail:
>
> org.geotools.filter.text.cql2.CQLException: Encountered "t" at line 1,
> column 195.
> Was expecting one of:
>     <NOT> ...
>     <IDENTIFIER> ...
>     "include" ...
>     "exclude" ...
>     "(" ...
>     "[" ...
>      Parsing : r = 31 AND di = 5 AND BBOX(g, -38.857822, -76.111145,
> -74.64091, -38.61907) AND al <= 39.407307 AND s <= 1.6442835 AND b <=
> 83.14717 AND an <= 87.0774 AND he <= 40.89476 AND ve <= 88.761566 AND t <=
> 44.786507 AND m = true AND i = true.
>     at org.geotools.filter.text.cql2.CQLCompiler.compileFilter(CQLC
> ompiler.java:106)
>     at org.geotools.filter.text.commons.CompilerUtil.parseFilter(
> CompilerUtil.java:196)
>     at org.geotools.filter.text.cql2.CQL.toFilter(CQL.java:134)
>     at org.geotools.filter.text.cql2.CQL.toFilter(CQL.java:113)
>     at com.hps.GeomesaClient.query(GeomesaClient.java:134)
>     at com.hps.Reader.run(Reader.java:69)
>     at java.lang.Thread.run(Thread.java:745)
>
> This seems to be a bug in the ECQL parser. I posted the same on
> stackoverflow
> <http://stackoverflow.com/questions/43820026/geotools-filter-cqlexception-encountered-t/43825958#43825958>
>  and
> found an answer saying, that it is a limitation in the ECQL query parser.
> The letter 't' by itself (ignoring case) is the UTC token.
>
> https://github.com/geotools/geotools/blob/master/modules/lib
> rary/cql/src/main/jjtree/ECQLGrammar.jjt#L180-L187
>
> Thank You
> Suresh Prajapati
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> GeoTools-GT2-Users mailing list
> GeoTools-GT2-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>


-- 
Ian Turton
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to