| 207 | } |
| 208 | |
| 209 | pub fn display_all_functions() -> Result<()> { |
| 210 | println!("Available help:"); |
| 211 | let array = StringArray::from( |
| 212 | ALL_FUNCTIONS |
| 213 | .iter() |
| 214 | .map(|f| format!("{f}")) |
| 215 | .collect::<Vec<String>>(), |
| 216 | ); |
| 217 | let schema = Schema::new(vec![Field::new("Function", DataType::Utf8, false)]); |
| 218 | let batch = RecordBatch::try_new(Arc::new(schema), vec![Arc::new(array)])?; |
| 219 | println!("{}", pretty_format_batches(&[batch]).unwrap()); |
| 220 | Ok(()) |
| 221 | } |
| 222 | |
| 223 | /// PARQUET_META table function |
| 224 | #[derive(Debug)] |