ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Magda <dma...@apache.org>
Subject Re: Geospatial queries example fails in master
Date Fri, 18 Nov 2016 20:40:58 GMT
Andrey,

Ok, now I see why the functionality has been broken. Basically, to fix the issue we should
avoid the conversion of all “com.vividsolutions.jts” parameters to the binary form. 

Please see in attach a possible fix. It would be more elegant to register the geospatial classes
in BinaryContext but the classes are optional and I don’t see a way how to do this.

Vovan, is there more sophisticated fix for the issue or the one that is attached is already
a generic one?

> However, spatial queries work fine with OptimizedMarshaller configured. We
> already have test GridH2IndexingGeoSelfTest, and we can run it with
> BinaryMarshaller as well.

Alright, this is why that test didn’t fail. Yes, please make sure the test is executed for
both optimized and binary marshallers.



—
Denis

> On Nov 18, 2016, at 11:16 AM, Andrey Mashenkov <andrey.mashenkov@gmail.com> wrote:
> 
> Query parameters are converted to binary since commit "ae77653". This is
> result of IGNITE-2208[1].
> 
> However, spatial queries work fine with OptimizedMarshaller configured. We
> already have test GridH2IndexingGeoSelfTest, and we can run it with
> BinaryMarshaller as well.
> 
> 
> [1] https://issues.apache.org/jira/browse/IGNITE-2208
> 
> 
> On Fri, Nov 18, 2016 at 8:20 PM, Denis Magda <dmagda@gridgain.com> wrote:
> 
>> 2. Most likely we don’t need to convert the spatial objects into the
>> binary form.
>> 
>> I would investigate what has changed since the recent release where
>> everything worked fine. Also don’t forget to add a test for the broken
>> functionality.
>> 
>> —
>> Denis
>> 
>>> On Nov 18, 2016, at 8:54 AM, Sergi Vladykin <sergi.vladykin@gmail.com>
>> wrote:
>>> 
>>> 1. The change itself is buggy because if the parameter is null, then we
>>> will call setNull and setObject after that. It must be `else if ...`
>>> 
>>> 2. I'm not sure how this deserialization fits to our "no classes on
>> server"
>>> ideology.
>>> 
>>> Sergi
>>> 
>>> 
>>> 
>>> 2016-11-18 14:26 GMT+03:00 Andrey Mashenkov <andrey.mashenkov@gmail.com
>>> :
>>> 
>>>> Hi Denis,
>>>> 
>>>> Sql query parameters have being converted to binary before query is
>> sent to
>>>> QueryProcessor. But they haven't being deserialized by QueryProcessor on
>>>> binding.
>>>> So, H2 failed to execute query due to wrong parameter type.
>>>> 
>>>> I've added PR [1] with fix. Sergi, please review if it correct place and
>>>> way to deserialize parameters.
>>>> 
>>>> [1] https://github.com/apache/ignite/pull/1248
>>>> 
>>>> 
>>>> On Thu, Nov 17, 2016 at 4:30 AM, Denis Magda <dmagda@apache.org> wrote:
>>>> 
>>>>> Igniters,
>>>>> 
>>>>> I’ve just added the documentation about our geospatial queries [1]
and
>>>>> wanted to contribute an example [2].
>>>>> 
>>>>> However, the example no longer works in the master branch producing the
>>>>> error you can see in the ticket [2].
>>>>> The same example works perfectly fine in version 1.7 and earliest. You
>>>> can
>>>>> download this project [3] and check that it’s true.
>>>>> 
>>>>> Sergi, please have a look at the issue reported in [1]. We’re
>> approaching
>>>>> 1.8 release and looks like we overlooked some new bug introduced
>>>> recently.
>>>>> 
>>>>> [1] http://apacheignite.gridgain.org/v1.7/docs/geospatial-queries <
>>>>> http://apacheignite.gridgain.org/v1.7/docs/geospatial-queries>
>>>>> [2] https://issues.apache.org/jira/browse/IGNITE-4238 <
>>>>> https://issues.apache.org/jira/browse/IGNITE-4238>
>>>>> [3] https://github.com/dmagda/geospatial <https://github.com/dmagda/
>>>>> geospatial>
>>>>> 
>>>>> —
>>>>> Denis
>>>> 
>>>> 
>>>> 
>>>> 
>>>> --
>>>> С уважением,
>>>> Машенков Андрей Владимирович
>>>> Тел. +7-921-932-61-82
>>>> 
>>>> Best regards,
>>>> Andrey V. Mashenkov
>>>> Cerr: +7-921-932-61-82
>>>> 
>> 
>> 
> 
> 
> -- 
> С уважением,
> Машенков Андрей Владимирович
> Тел. +7-921-932-61-82
> 
> Best regards,
> Andrey V. Mashenkov
> Cerr: +7-921-932-61-82


Mime
View raw message