我查詢簡單的功能型架構: 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'
geotools過濾CQLException:遇到 「T」
與查詢表達式: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.
但它拋出一個異常說Encountered "t" at line 1, column 195.
這裏是我的例外日誌詳細信息:
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)
我無法確定,爲什麼它是在使用名爲t
的屬性查詢時拋出異常。而如果我從查詢中刪除屬性t
,它會按預期工作。 t
是保留鍵嗎?或者我失去了一些東西。
我剛試過這個ECQL.toFilter(「t = 44.786507」),它引發基本上相同的異常。 (E)CQL解析器中可能存在一個錯誤... – GeoMesaJim