Skip to content
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

[client-v2] No conversion between number types (ex. short to int) #1852

Closed
chernser opened this issue Oct 7, 2024 · 0 comments · Fixed by #1856
Closed

[client-v2] No conversion between number types (ex. short to int) #1852

chernser opened this issue Oct 7, 2024 · 0 comments · Fixed by #1856

Comments

@chernser
Copy link
Contributor

chernser commented Oct 7, 2024

Describe the bug

It should be possible to get number values in different convertible types. Today it is required for application to know datatype of a column.

For example, binary format reader:

java.lang.ClassCastException: class java.lang.Short cannot be cast to class java.lang.Integer (java.lang.Short and java.lang.Integer are in module java.base of loader 'bootstrap')

	at com.clickhouse.client.api.data_formats.internal.AbstractBinaryFormatReader.getInteger(AbstractBinaryFormatReader.java:484)

Expected behavior

Convertion between number types should be done automatically where applicable without data truncation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant