duckfn 0.0.18

Write DuckDB extensions in plain Rust: attribute macros that turn ordinary functions into scalar/aggregate/table functions, SQL macros and nested LIST/MAP/ARRAY/STRUCT types.
Documentation

require duckfn


query I
SELECT word_count_m(sentence) FROM (
      VALUES ('hello world'), ('  padded  '), (''), (NULL)
) t(sentence);
----
 3


query I
  SELECT word_count_w(sentence) FROM (
      VALUES ('hello world'), ('  padded  '), (''), (NULL)
  ) t(sentence);
----
 3


query IT rowsort
  SELECT range % 3 as g,agg_list_w(range) from range(9) group by g;
----
0	[0, 3, 6]
1	[1, 4, 7]
2	[2, 5, 8]