rudb_functions/lib.rs
1//! The scalar, aggregate and window function library.
2//!
3//! Rank 7 in the layer rule. See `xtask/layers.toml` and `spec/18-package-layout.md`.
4//!
5//! Most of what is here is the signature half: given a name and the types of the arguments, which
6//! function is that and what does it return. The implementations are separate work and they go
7//! behind the same names, so the binder does not change when they arrive.
8//!
9//! [`mod@file`] is the exception and it reads a file. A table function that scans a Parquet file cannot
10//! be resolved from a table of names, because its columns are in the file, so resolving one means
11//! opening it. That is the only I/O in this crate and it is the reason `rudb-io` and `rudb-parquet`
12//! are dependencies of it.
13
14#![forbid(unsafe_code)]
15
16pub mod file;
17pub mod signature;
18pub mod table;
19
20pub use file::{
21 csv_fields, csv_given, files, is_file, is_pattern, open_csv, open_parquet, parquet_fields,
22};
23pub use rudb_csv::Given;
24pub use signature::{FunctionKind, Resolved, kind_of, resolve};
25pub use table::{Columns, ResolvedTable, TableFunction, resolve_table, series, series_length};