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

[#91] InfluxDB - Decimal number formatting (float, double and BigDecimal) #95

Conversation

cyrille-leclerc
Copy link
Member

@cyrille-leclerc cyrille-leclerc commented Feb 15, 2017

Work on #91
Add test case to check the output for a big float

@cyrille-leclerc
Copy link
Member Author

I found in the official java client https://github.com/influxdata/influxdb-java/blob/influxdb-java-2.5/src/main/java/org/influxdb/dto/Point.java#L321

NumberFormat numberFormat = NumberFormat.getInstance(Locale.ENGLISH);
numberFormat.setMaximumFractionDigits(MAX_FRACTION_DIGITS);
numberFormat.setGroupingUsed(false);
numberFormat.setMinimumFractionDigits(1);

The expected string for `123_456_789.012_345 ` is `123456789.012345` and is NOT `1.23456789012345E8` as we generate today.
See https://github.com/influxdata/influxdb-java/blob/influxdb-java-2.5/src/main/java/org/influxdb/dto/Point.java#L321
@cyrille-leclerc
Copy link
Member Author

@kerlandsson & @BriacRONDI can you please review this code and, if possible, test?

@cyrille-leclerc cyrille-leclerc changed the title [#91] InfluxDB - Float formatting [#91] InfluxDB - Decimal number formatting (float, double and BigDecimal) Feb 16, 2017
@cyrille-leclerc cyrille-leclerc merged commit 019df0e into jmxtrans:master Feb 16, 2017
@kerlandsson
Copy link
Member

kerlandsson commented Feb 16, 2017 via email

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

Successfully merging this pull request may close these issues.

2 participants