Seems like there are two options: 1. Figure out if JJTree can handle
tokens being re-used as attributes, 2. As Suresh suggested, provide a
way to let users know that their attribute name may be a reserved keyword.
As a second issue, in GeoMesa, we are using CQL as representation of
what filtering to apply. As such, we pass around CQL filters as both
strings and Java objects. For distributed communication, the string
"ECQL.toCQL" representation is used. On the other machines,
ECQL.toFilter is called.
Basically, this assumes that ECQL.toFilter(ECQL.toCQL(filter)) is more
or less the 'identity' function. Ian's suggestion to use double quotes
are stripped by this process...
To cover this use case, there may need to be an ECQL.toSafeCQL function
created. (I'm halfway volunteering.) Thoughts?
Jim
On 05/07/2017 12:21 PM, Jody Garnett wrote:
so what is the conflict? is "t" a representation of true or something?
Oh I see it is conflicting with a time representation .. what can be
done about that?
--
Jody Garnett
On 7 May 2017 at 02:52, Ian Turton <ijtur...@gmail.com
<mailto:ijtur...@gmail.com>> wrote:
I've put this in a bug report
https://osgeo-org.atlassian.net/browse/GEOT-5722
<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 <mailto:sureshpraja1...@gmail.com>> wrote:
Hello everyone,
I am querying a simple feature type schema:
r:Long:index=join,*g:Point:srid=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(CQLCompiler.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/library/cql/src/main/jjtree/ECQLGrammar.jjt#L180-L187
<https://github.com/geotools/geotools/blob/master/modules/library/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
<mailto:GeoTools-GT2-Users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
<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
<mailto:GeoTools-GT2-Users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
<https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users>
------------------------------------------------------------------------------
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
------------------------------------------------------------------------------
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