use std::collections::HashMap;
use std::str::FromStr;
use std::sync::LazyLock;
use crate::text::simple_extensions::SimpleExtensions;
use crate::urn::Urn;
pub static EXTENSIONS: LazyLock<HashMap<Urn, SimpleExtensions>> = LazyLock::new(|| {
substrait_extensions::extensions::EXTENSIONS
.iter()
.map(|(name, extension)| {
let urn = Urn::from_str(&format!("extension:io.substrait:{name}")).expect("valid urn");
(urn, extension.clone())
})
.collect()
});
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn core_extensions() {
LazyLock::force(&EXTENSIONS);
}
}