Does ECQL use `[` `]` for anything currently - could we hack the grammar to
support [1,2,3] as an array?

Ian

On Fri, 24 Apr 2020 at 14:53, Mauro Bartolomeoli <
mauro.bartolome...@geo-solutions.it> wrote:

> Hi Jody and all,
> I did a little bit more of investigation, and I replaced arrayOverlap with
> a more generic FilterFunction_multipleEqualTo (better names are welcome)
> that is like FilterFunction_equalTo with an additional parameter to specify
> the MatchAction (ANY, ONE or ALL).
> Still open the reasoning on how to express array literals in ECQL. For my
> own use case I can move the arrayFromString function in my project code,
> but I think a more general solution to this problem could be useful to have
> in GeoTools.
>
> Il giorno ven 24 apr 2020 alle ore 09:01 Mauro Bartolomeoli <
> mauro.bartolome...@geo-solutions.it> ha scritto:
>
>> Hi Jody,
>>
>>
>> Il giorno gio 23 apr 2020 alle ore 19:44 Jody Garnett <
>> jody.garn...@gmail.com> ha scritto:
>>
>>> Filter is not typed, seeing types in the function name read more like
>>> java and less like CQL.
>>>
>>> *split( string, delimiter )*
>>>
>>>
>>> For the same reason I do not want to see parameters like
>>> 'java.lang.Integer' used when Filter environment is untyped. If you do need
>>> an int[] from an expression, make sure Converters handles it appropriately
>>> so the work is done once. It is bad enough we have functions like int2bbool
>>> and int2double as there should not be a need for it.
>>>
>>
>> I understand your concern, and I try to express my underlying need, so
>> that we can identify the best solution, What I miss in (E)CQL right now is
>> a way to express array literals. The proposal above was indeed about being
>> able to create an array of numbers. Do you have any alternative idea on how
>> we can do that?
>>
>>
>>> I am not sure what to make of array overlaps function:
>>> - I see the name conflict with overlaps(geom,geom) function
>>> - We already have equals with matchAction Any to handle this
>>> functionality, is there any reason why you need it to be a function and not
>>> a filter?
>>> - There are examples where filters have been repurposed as functions
>>> already, for example the equalTo(a,b): Boolean function. I would follow
>>> that example.
>>>
>>> equalTo( value, value, matchPolicy ) - where matchPolicy is "All", "Any"
>>> or "One"
>>>
>>>
>> After reading this, I had a look at the postgis driver code to handle
>> array comparisons, and maybe I can make it work using equalTo. Going to try
>> and let you know.
>> Thanks for your suggestions.
>>
>> --
>>
>> Regards,
>>
>> Mauro Bartolomeoli
>>
>> ==
>> GeoServer Professional Services from the experts! Visit
>> http://goo.gl/it488V for more information.
>> ==
>>
>> Dott. Mauro Bartolomeoli
>> @mauro_bart
>> Technical Lead
>>
>> GeoSolutions S.A.S.
>> Via di Montramito 3/A
>> 55054  Massarosa (LU)
>> Italy
>>
>> mobile: +39 393 904 1756
>> phone: +39 0584 962313
>> fax:      +39 0584 1660272
>>
>> http://www.geo-solutions.it
>> http://twitter.com/geosolutions_it
>>
>> -------------------------------------------------------
>>
>> Con riferimento alla normativa sul trattamento dei dati personali (Reg.
>> UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
>> precisa che ogni circostanza inerente alla presente email (il suo
>> contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
>> riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
>> messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
>> operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
>>
>> This email is intended only for the person or entity to which it is
>> addressed and may contain information that is privileged, confidential or
>> otherwise protected from disclosure. We remind that - as provided by
>> European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
>> e-mail or the information herein by anyone other than the intended
>> recipient is prohibited. If you have received this email by mistake, please
>> notify us immediately by telephone or e-mail.
>>
>
>
> --
>
> Regards,
>
> Mauro Bartolomeoli
>
> ==
> GeoServer Professional Services from the experts! Visit
> http://goo.gl/it488V for more information.
> ==
>
> Dott. Mauro Bartolomeoli
> @mauro_bart
> Technical Lead
>
> GeoSolutions S.A.S.
> Via di Montramito 3/A
> 55054  Massarosa (LU)
> Italy
>
> mobile: +39 393 904 1756
> phone: +39 0584 962313
> fax:      +39 0584 1660272
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>
> Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE
> 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
> precisa che ogni circostanza inerente alla presente email (il suo
> contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
> riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
> messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
> operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
>
> This email is intended only for the person or entity to which it is
> addressed and may contain information that is privileged, confidential or
> otherwise protected from disclosure. We remind that - as provided by
> European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
> e-mail or the information herein by anyone other than the intended
> recipient is prohibited. If you have received this email by mistake, please
> notify us immediately by telephone or e-mail.
> _______________________________________________
> GeoTools-Devel mailing list
> GeoTools-Devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>


-- 
Ian Turton
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to