8000 fix(docs, vrl stdlib): Document that `to_int` coerces `null`s by jszwedko · Pull Request #21154 · vectordotdev/vector · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(docs, vrl stdlib): Document that to_int coerces nulls #21154

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

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion website/cue/reference/remap/functions/to_int.cue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ remap: functions: to_int: {
The value to convert to an integer.
"""
required: true
type: ["integer", "float", "boolean", "string", "timestamp"]
type: ["integer", "float", "boolean", "string", "timestamp", "null"]
},
]
internal_failure_reasons: [
Expand All @@ -28,6 +28,7 @@ remap: functions: to_int: {
"If `value` is a string, it must be the string representation of an integer or else an error is raised.",
"If `value` is a boolean, `0` is returned for `false` and `1` is returned for `true`.",
"If `value` is a timestamp, a [Unix timestamp](\(urls.unix_timestamp)) (in seconds) is returned.",
"If `value` is null, `0` is returned.",
]
}

Expand Down
Loading
0