Skip to content

Support float64 in enum processor#8911

Merged
ssoroka merged 1 commit intoinfluxdata:masterfrom
BetaFold3:enum-processor-float64
Apr 13, 2021
Merged

Support float64 in enum processor#8911
ssoroka merged 1 commit intoinfluxdata:masterfrom
BetaFold3:enum-processor-float64

Conversation

@BetaFold3
Copy link
Copy Markdown
Contributor

This adds float64 support to enum processor.

Required for all PRs:

  • Associated README.md updated.
  • Has appropriate unit tests.

@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Feb 26, 2021
Copy link
Copy Markdown
Contributor

@telegraf-tiger telegraf-tiger bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤝 ✅ CLA has been signed. Thank you!

@srebhan
Copy link
Copy Markdown
Member

srebhan commented Feb 26, 2021

@tuannh99 while the code looks good I wonder what your use case is. As far as I get it you want to replace a float value with something else?
However, float values are notoriously difficult to compare and your are trying to convert a dense quantity into a categorical value which is ill-defined anyway without quantization.
To cut a long story short, please outline your use-case. If you really need this I would expect at least an option float_precision and maybe additionally float_rounding which can be floor, ceil and round at least...

@srebhan srebhan self-assigned this Feb 26, 2021
@srebhan
Copy link
Copy Markdown
Member

srebhan commented Mar 15, 2021

@tuannh99 any news on this?

@BetaFold3
Copy link
Copy Markdown
Contributor Author

@srebhan I should have a commit to update this in a few.

@srebhan
Copy link
Copy Markdown
Member

srebhan commented Mar 18, 2021

@tuannh99 can you please comment on my concern above that trying to map a raw floating point value is very fragile and explain what your use-case is

@ssoroka
Copy link
Copy Markdown
Contributor

ssoroka commented Apr 13, 2021

This is fine as is. In a future PR we may want to expose the FormatFloat() precision argument, to give users the ability to control how precisely the floats are matched.

@ssoroka ssoroka merged commit 7cbde18 into influxdata:master Apr 13, 2021
arstercz pushed a commit to arstercz/telegraf that referenced this pull request Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants