From 968b5df014a027dd1a4cb366e3db383c1c501c6c Mon Sep 17 00:00:00 2001 From: Jesse Szwedko Date: Mon, 26 Aug 2024 09:22:23 -0700 Subject: [PATCH] fix(docs, vrl stdlib): Document that `to_int` coerces `null`s (#21154) Signed-off-by: Jesse Szwedko --- website/cue/reference/remap/functions/to_int.cue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/cue/reference/remap/functions/to_int.cue b/website/cue/reference/remap/functions/to_int.cue index 1c8f3dcb48d41..688c59704c0a2 100644 --- a/website/cue/reference/remap/functions/to_int.cue +++ b/website/cue/reference/remap/functions/to_int.cue @@ -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: [ @@ -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.", ] }