pub enum TableFunction {
Range,
GenerateSeries,
ReadParquet,
ReadCsv,
}Expand description
Which table function a call resolved to.
An enum rather than a name, because the executor dispatches on this and a string comparison per operator build is a string comparison that can be spelled wrong.
Variants§
Range
range(stop), range(start, stop), range(start, stop, step), stopping before the end.
GenerateSeries
The same three, stopping on the end.
ReadParquet
read_parquet(path), the rows of a Parquet file.
ReadCsv
read_csv(path), the rows of a CSV file, with everything about how it is written sniffed.
Implementations§
Source§impl TableFunction
impl TableFunction
Sourcepub const fn inclusive(self) -> bool
pub const fn inclusive(self) -> bool
Whether the last value is produced.
Only the two series functions differ here. The file readers answer false and nothing asks them.
Sourcepub fn parameters(self) -> &'static [(&'static str, LogicalType)]
pub fn parameters(self) -> &'static [(&'static str, LogicalType)]
The named parameters the call takes, and the type each one wants.
This is the list rudb acts on and not the list DuckDB prints, and the difference is worth
being plain about. read_parquet there takes seventeen named parameters and read_csv
takes around thirty. One of the Parquet ones is on the critical path, since the ClickBench
entry reads its file with binary_as_string=True and without it every string column in
hits.parquet comes back as BLOB, and the other sixteen have no caller here yet. A
parameter that is listed is one that does something, so this list grows as they land rather
than accepting names and ignoring them, which is the failure mode that makes an option look
supported when it is not.
The CSV ones here are the ones that say how the file is written, which are the ones where
guessing wrong changes the answer rather than the speed. sep is DuckDB’s other name for
delim and is a separate row rather than an alias, because the list is also what the
candidates on a misspelling are read out of and the binary prints both of them.
Trait Implementations§
Source§impl Clone for TableFunction
impl Clone for TableFunction
Source§fn clone(&self) -> TableFunction
fn clone(&self) -> TableFunction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more