use super::super::data::{Stream, Type};
use super::super::exec::SelectorCx;
use super::super::registry::{GraphId, SelectFn};
const BITPACK_SERIAL: GraphId = GraphId::std(40);
const BITPACK_INT: GraphId = GraphId::std(41);
#[derive(Debug)]
pub(crate) struct BitpackSelector;
pub(crate) static BITPACK: BitpackSelector = BitpackSelector;
impl SelectFn for BitpackSelector {
fn select(&self, _: &mut SelectorCx<'_, '_, '_>, input: &Stream<'_>, _: &[GraphId]) -> GraphId {
if input.ty() == Type::Numeric {
BITPACK_INT
} else {
BITPACK_SERIAL
}
}
}