use vortex_session::registry::Id;
use crate::scalar_fn::fns::byte_length::ByteLength;
use crate::scalar_fn::fns::ext_storage::ExtStorage;
use crate::scalar_fn::fns::get_item::GetItem;
use crate::scalar_fn::fns::literal::Literal;
mod vtable;
pub use vtable::*;
mod plugin;
pub use plugin::*;
mod foreign;
pub use foreign::*;
mod typed;
pub use typed::*;
mod erased;
pub use erased::*;
mod options;
pub use options::*;
mod signature;
pub use signature::*;
pub mod fns;
pub mod internal;
pub mod session;
pub type ScalarFnId = Id;
mod sealed {
use crate::scalar_fn::ScalarFnVTable;
use crate::scalar_fn::typed::TypedScalarFnInstance;
pub(crate) trait Sealed {}
impl<V: ScalarFnVTable> Sealed for TypedScalarFnInstance<V> {}
}
pub fn is_negative_cost(id: ScalarFnId) -> bool {
id == ScalarFnVTable::id(&ByteLength)
|| id == ScalarFnVTable::id(&ExtStorage)
|| id == ScalarFnVTable::id(&GetItem)
|| id == ScalarFnVTable::id(&Literal)
}