diff --git a/content/influxdb/cloud-iox/reference/sql/functions/misc.md b/content/influxdb/cloud-iox/reference/sql/functions/misc.md new file mode 100644 index 000000000..c6dcc98ee --- /dev/null +++ b/content/influxdb/cloud-iox/reference/sql/functions/misc.md @@ -0,0 +1,78 @@ +--- +title: Miscellaneous SQL functions +list_title: Miscellaneous functions +description: > + Use miscellaneous SQL functions to perform a variety of operations in SQL queries. +menu: + influxdb_cloud_iox: + name: Miscellaneous + parent: sql-functions +weight: 310 +--- + +The InfluxDB SQL implementation supports the following miscellaneous functions +for performing a variety of operations: + +- [arrow_typeof](#arrow_typeof) + + +## arrow_typeof + +Returns the underlying [Arrow type]() of the the expression: + +```sql +arrow_typeof(expression) +``` + +##### Arguments + +- **expression**: Column or literal value to evaluate. + +{{< expand-wrapper >}} +{{% expand "View `arrow_typeof` query example" %}} + +_The following example uses the sample data set provided in +[Get started with InfluxDB tutorial](/influxdb/cloud-iox/get-started/write/#construct-line-protocol)._ + +```sql +SELECT + arrow_typeof(time) AS time, + arrow_typeof(room) AS room, + arrow_typeof(temp) AS temp, + arrow_typeof(co) AS co +FROM home +LIMIT 1 +``` + +| time | room | temp | co | +| :-------------------------- | :---------------------- | :------ | :---- | +| Timestamp(Nanosecond, None) | Dictionary(Int32, Utf8) | Float64 | Int64 | + +{{% /expand %}} +{{< /expand-wrapper >}} + +