GitHub user wraydulany opened a pull request:
https://github.com/apache/incubator-pirk/pull/115
PIRK-79
This PR is to address the notional problem that the QueryDeserializer I
wrote would throw an exception if it received a request to deserialize a query
which didn't have a full schema included, only a name. I realized that Pirk
should be expected to handle such a circumstance, and that my code wouldn't.
Ironically, the best way of fixing this was to eliminate my custom
deserializer. I realized this when I couldn't get changes to the
QueryDeserializer code to affect anything. I looked closely at the
JsonSerializer and realized my IDE had auto-imported the wrong "Query" (thanks,
Intellij!) and so the custom class wasn't actually performing the
deserialization. This...I'll be honest, it felt embarassing, and so I share it
with you, to simultaneously embiggen and diffuse the embarassment.
Along the way, I did some small bug fixing and, more importantly, fleshed
out SerializationTest. We now actually test serializing and deserializing
Response and Querier objects (and, along the way, Query, QueryInfo,
QuerySchema, and Paillier objects), for both serializers, java and json.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/wraydulany/incubator-pirk PIRK-79
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-pirk/pull/115.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #115
----
commit 708bf0cf8c705d2d09a5c8fac1859371e21d6c9c
Author: Walter Ray-Dulany <[email protected]>
Date: 2016-10-28T15:26:56Z
Working on it.
commit 7d72474423ef48388e93605200e206ea8b313a24
Author: Walter Ray-Dulany <[email protected]>
Date: 2016-10-29T16:05:48Z
Begin excision of QueryDeserializer; gson does a good enough job on its own.
commit a3c5b6c080202af9ca50d8281bff89b0a0466d41
Author: Walter Ray-Dulany <[email protected]>
Date: 2016-10-30T00:06:48Z
Passes all local tests. Time to merge in master
commit 67064dbf628e692922bb9b9ec820e44145f126a0
Author: Walter Ray-Dulany <[email protected]>
Date: 2016-10-30T00:07:43Z
Merge remote-tracking branch 'upstream/master' into PIRK-79
commit cd03f18bfe823f790c70d94d96bab18e61a04b47
Author: Walter Ray-Dulany <[email protected]>
Date: 2016-10-30T17:05:13Z
How did that Expose annotation die?
commit 9943966a5a653c2b1d67203e3b845c50f4d405c8
Author: Walter Ray-Dulany <[email protected]>
Date: 2016-10-30T23:15:17Z
Updated SerializationTest to exercise both java and json serialization on
querier and response.
commit 56c8b7e6e281eeab393c3aa54427fb41ce7ca7c1
Author: Walter Ray-Dulany <[email protected]>
Date: 2016-10-31T00:01:05Z
turn back on default java serialization.
commit a1dcce98492b3702b5b7291a8af924122cf78593
Author: Walter Ray-Dulany <[email protected]>
Date: 2016-10-31T00:06:15Z
Turns out google is often better at json deserialization than I.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---