-
Notifications
You must be signed in to change notification settings - Fork 558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lost ArrayToStringDeserializer in ClickhouseResponse #851
Comments
Thanks for reporting the issue. It seems you're using the legacy driver. The new driver is Are you relying on JSON data format and extended API? If that's the case, you probably don't have to use JDBC driver but Java client. |
Thanks for the answer. We have a lot of interactions with clickhouse via jdbc in our code, and migrating it to http-client may take a lot of time. Also, yes, we are using queryJson a lot, so, turns out, we cannot migrate to non-legacy driver. The scope of my task was just to update driver, so that it could parse CH exception codes with dots and commas alike. I will try to make pull request, that preserves old behaviour, if it's ok. Gson does not seem to have nice annotations like ArrayToStringDeserializer, but custom deserializer should get the job done. |
done: #862 I'm sorry, if anything wrong there - I'm a bit new to public github. |
I see. Thanks @debychkov for the details and sorry for the inconvenience caused at your end.
Yes, it makes perfect sense to stay with JDBC API. It seems performance is not a concern, so it should be fine to use legacy driver. However, there are a few things you may want to consider:
Thanks for your contribution. I'll add some more tests along with additional changes in these days, and make it part of another patch in the coming weekend :) |
Hi, i'm migrating from 0.2.6 to 0.3.2, and ran into another issue. Code example:
Fails with exception while parsing response:
It's probably related to #740.
ClickhouseResponse "data" node expects array of arrays (columns/rows), but when we have tuple in a result set it's also written as array, so Gson cannot parse the third array.
The text was updated successfully, but these errors were encountered: