INTEGRITY Документация

Другие функции

Реализации скалярных функций Cloudflare Pipelines основаны на Apache DataFusion ↗ (через Arroyo ↗) и эта документация составлена на основе справочника функций DataFusion.

arrow_cast

Приводит значение к указанному типу данных Arrow:

arrow_cast(expression, datatype)

Аргументы

Пример

> select arrow_cast(-5, 'Int8') as a,
  arrow_cast('foo', 'Dictionary(Int32, Utf8)') as b,
  arrow_cast('bar', 'LargeUtf8') as c,
  arrow_cast('2023-01-02T12:53:02', 'Timestamp(Microsecond, Some("+08:00"))') as d
  ;
+----+-----+-----+---------------------------+
| a  | b   | c   | d                         |
+----+-----+-----+---------------------------+
| -5 | foo | bar | 2023-01-02T12:53:02+08:00 |
+----+-----+-----+---------------------------+
1 row in set. Query took 0.001 seconds.

arrow_typeof

Возвращает имя базового Тип данных Arrow ↗ выражения:

arrow_typeof(expression)

Аргументы

Пример

> select arrow_typeof('foo'), arrow_typeof(1);
+---------------------------+------------------------+
| arrow_typeof(Utf8("foo")) | arrow_typeof(Int64(1)) |
+---------------------------+------------------------+
| Utf8                      | Int64                  |
+---------------------------+------------------------+
1 row in set. Query took 0.001 seconds.