-
Notifications
You must be signed in to change notification settings - Fork 970
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
Incorrect result returned by getFloat
in JDBC.
#2132
Comments
Hi, same reason of your last question. Try to use encoding type |
Using encoding type I will try to make a simple fix for the latter problem. |
Hi, thanks for your detailed description, and welcome to contribute 👍 |
Hi, I checked the code and found it's a typo mistake: It's in 326 line of Thanks for your detailed description!! If you don't mind, welcome to pull a PR to fix it :D |
The bug is fixed. I'll close this issue. |
Describe the bug
I got clearly incorrect results when retrieving data using method
getFloat
.To Reproduce
Steps to reproduce the behavior:
CREATE TIMESERIES root.t.d WITH DATATYPE=FLOAT, ENCODING=GORILLA
INSERT INTO root.t(timestamp,d) VALUES(1,1.2345678)
I got incorrect result from
getFloat()
.Expected behavior
I should get a correct result from
getFloat()
.Desktop (please complete the following information):
Additional context
The inplementation in
IoTDBRpcDataSet.java
shows that it just convertsthe bytes to float in the method, while the bytes are actually in the format of String.
A further dig into the source code shows that all data are in the format of String except the timestamp.
I presume that the raw data transferred from the database is in the format of String.
This may cause performance issue(extra parsing and formatting, more transfer cost).
The text was updated successfully, but these errors were encountered: