-
Notifications
You must be signed in to change notification settings - Fork 478
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
Type conversion exception #791
Comments
YES!, this is happening to me as well. I have the latest version installed (2.22) When I use chronograf and look at the data it is indeed of type integer but has a value of decimal, which means it's being written to the db that way (instead of converted afterwards during a query) FWIW I'm creating the record using line protocol:
I am also dynamically creating this on the fly via the line of code shown above. In other words, I did not create the measurement on startup/creation before running the above line of code. As a temp workaround I am casting the result from double to int, but I shouldnt have to be doing that |
Not sure if this is the reason, but it looks like it might be why (Line 157) |
Yes, I've tried other types of integer data. It does convert all integer data to double |
@majst01 We appreciate your hard work with this package but this has been a major blocker for a while now! Will you be able to fix this in your next release and if so, do you have a rough estimate of when that will be? Thanks! |
If someone is willing to look deeper into the the root cause of this i will review any PR. |
@majst01 I already did. It's mentioned on this thread a few comments up :) |
Sure, this is the why, but whats the solution ? |
@majst01 To change "value = ((Integer) value).doubleValue()"; to "value = ((Integer) value)"; |
Fine, write a PR and make all unit tests pass again |
@majst01 Unfortunately I don't know how to do that. I'm not a big githubber sorry |
|
@majst Thanks for that link. How do I 'make sure all unit tests pass again' this is a maven project, an with the given shell script |
@majst01 I appreciate the links. I tried but unfortunately I shouldn't be the one doing PR as I'm not familiar enough with the overall codebase and the impact of changing existing test cases. I may end up messing a useful test case to 'fit' my fix. I know what the problem is and have pointed to the line of code that is causing it... that's the best I can do. |
A field is an Integer in the database, but it is a Double value when it is retrieved
The text was updated successfully, but these errors were encountered: