influxdata / influxdata/influxdb-client-java
InfluxQLQueryApi.queryJson should not transform all values to String
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 477
- Forks
- 129
- PR merge metrics
- No merged PRs in 30d
Description
__Proposal:__
It would be nice if influxQLQueryApi.queryJson() can preserve field types instead of converting everything to Strings.
ValueExtractor should expose an API with raw types.
__Current behavior:__
Unless a ValueExtractor is present, every values get transformed to String even of the InfluxDB Json result contains a non string value.
__Desired behavior:__
Unless a value extractor is specified, the JSON result should preserve original response types as much as possible
__Alternatives considered:__
For now, provide a value extractor that parse each String values.
It works but doing twice the job: for a number value it get read by Gson as Number then the client converts it to String then manually converted to back to a number.
__Use case:__
All use cases using influxQLQueryApi.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at InfluxQLQueryApi.queryJson and trace how ValueExtractor handles values from the InfluxDB JSON response. Check the existing query API behavior and tests, if present, to determine where values are converted to String. Done means queryJson preserves non-string response types by default while still supporting an explicitly provided value extractor.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, json
- Domain
- api, databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100