diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/bool.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/bool.md index 03935abee..149a6e285 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/bool.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/bool.md @@ -24,6 +24,8 @@ bool(v: "true") ### v The value to convert. +_**Data type:** Float | Integer | String | Uinteger_ + ## Examples ```js from(bucket: "sensor-data") diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/bytes.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/bytes.md index a3707bb88..893d4151a 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/bytes.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/bytes.md @@ -24,6 +24,8 @@ bytes(v: "1m") ### v The value to convert. +_**Data type:** String_ + ## Examples ```js from(bucket: "sensor-data") diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/duration.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/duration.md index bb52c0560..ed7c9c13b 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/duration.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/duration.md @@ -24,6 +24,13 @@ duration(v: "1m") ### v The value to convert. +_**Data type:** Integer | String | Uinteger_ + +{{% note %}} +`duration()` assumes **numeric** input values are **nanoseconds**. +**String** input values must use [duration literal representation](#/v2.0/reference/flux/language/lexical-elements/#duration-literals). +{{% /note %}} + ## Examples ```js from(bucket: "sensor-data") diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/float.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/float.md index 30e54c5b0..06b2108d2 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/float.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/float.md @@ -24,6 +24,8 @@ float(v: "3.14") ### v The value to convert. +_**Data type:** Boolean | Integer | Numeric String | Uinteger_ + ## Examples ```js from(bucket: "sensor-data") diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/int.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/int.md index a0da92ec4..5c73d70f5 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/int.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/int.md @@ -24,6 +24,15 @@ int(v: "4") ### v The value to convert. +_**Data type:** Boolean | Duration | Float | Numeric String | Time | Uinteger_ + +For duration and time values, `int()` returns the following: + +| Input type | Returned value | +|:---------- |:-------------- | +| Duration | The number of nanoseconds in the specified duration | +| Time | A nanosecond epoch timestamp | + ## Examples ```js from(bucket: "sensor-data") diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/string.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/string.md index d8c3648bf..582c1c9c1 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/string.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/string.md @@ -24,6 +24,8 @@ string(v: 123456789) ### v The value to convert. +_**Data type:** Boolean | Bytes | Duration | Float | Integer | Time | Uinteger_ + ## Examples ```js from(bucket: "sensor-data") diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/time.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/time.md index bcaa3fcaa..880683a2b 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/time.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/time.md @@ -24,6 +24,12 @@ time(v: "2016-06-13T17:43:50.1004002Z") ### v The value to convert. +_**Data type:** Integer | String | Uinteger_ + +{{% note %}} +`time()` assumes all numeric input values are nanosecond epoch timestamps. +{{% /note %}} + ## Examples ```js from(bucket: "sensor-data") diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/tobool.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/tobool.md index 2cad528d3..154900cc6 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/tobool.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/tobool.md @@ -14,12 +14,13 @@ weight: 501 The `toBool()` function converts all values in the `_value` column to booleans. _**Function type:** Type conversion_ -_**Output data type:** Boolean_ ```js toBool() ``` +_**Supported data types:** Float | Integer | String | Uinteger_ + {{% note %}} To convert values in a column other than `_value`, define a custom function patterned after the [function definition](#function-definition), diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/toduration.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/toduration.md index 6ffa8ad51..d66b51b26 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/toduration.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/toduration.md @@ -18,12 +18,18 @@ weight: 501 The `toDuration()` function converts all values in the `_value` column to durations. _**Function type:** Type conversion_ -_**Output data type:** Duration_ ```js toDuration() ``` +_**Supported data types:** Integer | String | Uinteger_ + +{{% note %}} +`duration()` assumes **numeric** input values are **nanoseconds**. +**String** input values must use [duration literal representation](#/v2.0/reference/flux/language/lexical-elements/#duration-literals). +{{% /note %}} + {{% note %}} To convert values in a column other than `_value`, define a custom function patterned after the [function definition](#function-definition), diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/tofloat.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/tofloat.md index cabaf654b..e3595b865 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/tofloat.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/tofloat.md @@ -14,12 +14,13 @@ weight: 501 The `toFloat()` function converts all values in the `_value` column to floats. _**Function type:** Type conversion_ -_**Output data type:** Float_ ```js toFloat() ``` +_**Supported data types:** Boolean | Integer | Numeric String | Uinteger_ + {{% note %}} To convert values in a column other than `_value`, define a custom function patterned after the [function definition](#function-definition), diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/toint.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/toint.md index 4053d716b..b678efe23 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/toint.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/toint.md @@ -14,12 +14,20 @@ weight: 501 The `toInt()` function converts all values in the `_value` column to integers. _**Function type:** Type conversion_ -_**Output data type:** Integer_ ```js toInt() ``` +_**Supported data types:** Boolean | Duration | Float | Numeric String | Time | Uinteger_ + +For duration and time values, `toInt()` returns the following: + +| Input type | Returned value | +|:---------- |:-------------- | +| Duration | The number of nanoseconds in the specified duration | +| Time | A nanosecond epoch timestamp | + {{% note %}} To convert values in a column other than `_value`, define a custom function patterned after the [function definition](#function-definition), diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/tostring.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/tostring.md index 99645fa1e..4a946f329 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/tostring.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/tostring.md @@ -14,12 +14,13 @@ weight: 501 The `toString()` function converts all values in the `_value` column to strings. _**Function type:** Type conversion_ -_**Output data type:** String_ ```js toString() ``` +_**Supported data types:** Boolean | Bytes | Duration | Float | Integer | Time | Uinteger_ + {{% note %}} To convert values in a column other than `_value`, define a custom function patterned after the [function definition](#function-definition), diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/totime.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/totime.md index ea36402ee..95a7f76ca 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/totime.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/totime.md @@ -14,12 +14,17 @@ weight: 501 The `toTime()` function converts all values in the `_value` column to times. _**Function type:** Type conversion_ -_**Output data type:** Time_ ```js toTime() ``` +_**Supported data types:** Integer | String | Uinteger_ + +{{% note %}} +`toTime()` assumes all numeric input values are nanosecond epoch timestamps. +{{% /note %}} + {{% note %}} To convert values in a column other than `_value`, define a custom function patterned after the [function definition](#function-definition), diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/touint.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/touint.md index d113d28a1..289d2babb 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/touint.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/touint.md @@ -14,12 +14,20 @@ weight: 501 The `toUInt()` function converts all values in the `_value` column to UIntegers. _**Function type:** Type conversion_ -_**Output data type:** UInteger_ ```js toUInt() ``` +_**Supported data types:** Boolean | Duration | Float | Integer | Numeric String | Time_ + +For duration and time values, `toUint()` returns the following: + +| Input type | Returned value | +|:---------- |:-------------- | +| Duration | The number of nanoseconds in the specified duration | +| Time | A nanosecond epoch timestamp | + {{% note %}} To convert values in a column other than `_value`, define a custom function patterned after the [function definition](#function-definition), diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/uint.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/uint.md index 72f12c2d0..3b3fcf8d0 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/uint.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/type-conversions/uint.md @@ -24,6 +24,15 @@ uint(v: "4") ### v The value to convert. +_**Data type:** Boolean | Duration | Float | Integer | Numeric String | Time_ + +For duration and time values, `uint()` returns the following: + +| Input type | Returned value | +|:---------- |:-------------- | +| Duration | The number of nanoseconds in the specified duration | +| Time | A nanosecond epoch timestamp | + ## Examples ```js from(bucket: "sensor-data") diff --git a/content/v2.0/reference/release-notes/flux.md b/content/v2.0/reference/release-notes/flux.md index d760ea40c..2369d7471 100644 --- a/content/v2.0/reference/release-notes/flux.md +++ b/content/v2.0/reference/release-notes/flux.md @@ -11,11 +11,28 @@ aliases: --- {{% note %}} -_The latest release of InfluxDB v2.0 alpha includes **Flux v0.55.1**. +_The latest release of InfluxDB v2.0 alpha includes **Flux v0.57.0**. Though newer versions of Flux may be available, they will not be included with InfluxDB until the next InfluxDB v2.0 release._ {{% /note %}} +## v0.57.0 [2019-12-10] + +### Features +- Categorize more flux errors with codes. +- Teach flux-config how to download the sources when using vendor. +- Opentracing in query execution runtime. +- Reduce memory allocations for operations in values. +- Translate FlatBuffers semantic graph to Go. +- Add types for some universe builtins. +- Add type declarations for builtins. +- Add Numeric and Row kind constraints. + +### Bug fixes +- Enable strict mode by default. + +--- + ## v0.56.0 [2019-12-05] ### Features