Skip to content

Commit

Permalink
docs(external): add notice for 'to_float' (#21973)
Browse files Browse the repository at this point in the history
* docs(external): add notice for 'to_float'

* fix typo
  • Loading branch information
pront authored and jszwedko committed Dec 9, 2024
1 parent 874b25c commit 885bc74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion website/cue/reference/remap/functions/to_float.cue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ remap: functions: to_float: {
description: """
Coerces the `value` into a float.
"""

notices: ["Since [VRL v0.20.0](\(urls.vrl_changelog)#0200-2024-11-27) which is used since Vector v0.43.0, this function behaves differently than [parse_float](\(urls.vrl_functions)#parse_float). Notably, `to_float` will return an error for [non-normal](\(urls.is_normal)) floats whereas [parse_float](\(urls.vrl_functions)#parse_float) can return `inf` which might result in unsafe arithmetic operations that panic. This will be addressed in the future."]
arguments: [
{
name: "value"
Expand Down
3 changes: 3 additions & 0 deletions website/cue/reference/urls.cue
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ urls: {
ip_ntoa: "https://linux.die.net/man/3/inet_ntoa"
ip_ntop: "https://linux.die.net/man/3/inet_ntop"
ip_pton: "https://linux.die.net/man/3/inet_pton"
is_normal: "https://doc.rust-lang.org/std/primitive.f64.html#method.is_normal"
iso_8601: "\(wikipedia)/wiki/ISO_8601"
iso3166_2: "\(wikipedia)/wiki/ISO_3166-2"
issue_1694: "\(vector_repo)/issues/1694"
Expand Down Expand Up @@ -654,6 +655,8 @@ urls: {
vrl_runtime_errors: "\(vrl_errors_reference)#runtime-errors"
vrl_safety: "\(vrl_reference)#safety"
vrl_type_safety: "\(vrl_reference)#type-safety"
vrl_repo: "\(github)/vectordotdev/vrl"
vrl_changelog: "\(vrl_repo)/blob/main/CHANGELOG.md"
vote_feature: "\(vector_repo)/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+label%3A%22Type%3A+New+Feature%22"
wasm: "https://webassembly.org/"
wasm_languages: "\(github)/appcypher/awesome-wasm-langs"
Expand Down

0 comments on commit 885bc74

Please sign in to comment.