polars_plan/dsl/
bitwise.rsuse std::sync::Arc;
use super::{AggExpr, BitwiseAggFunction, BitwiseFunction, Expr, FunctionExpr};
impl Expr {
pub fn bitwise_count_ones(self) -> Self {
self.apply_private(FunctionExpr::Bitwise(BitwiseFunction::CountOnes))
}
pub fn bitwise_count_zeros(self) -> Self {
self.apply_private(FunctionExpr::Bitwise(BitwiseFunction::CountZeros))
}
pub fn bitwise_leading_ones(self) -> Self {
self.apply_private(FunctionExpr::Bitwise(BitwiseFunction::LeadingOnes))
}
pub fn bitwise_leading_zeros(self) -> Self {
self.apply_private(FunctionExpr::Bitwise(BitwiseFunction::LeadingZeros))
}
pub fn bitwise_trailing_ones(self) -> Self {
self.apply_private(FunctionExpr::Bitwise(BitwiseFunction::TrailingOnes))
}
pub fn bitwise_trailing_zeros(self) -> Self {
self.apply_private(FunctionExpr::Bitwise(BitwiseFunction::TrailingZeros))
}
pub fn bitwise_and(self) -> Self {
Expr::Agg(AggExpr::Bitwise(Arc::new(self), BitwiseAggFunction::And))
}
pub fn bitwise_or(self) -> Self {
Expr::Agg(AggExpr::Bitwise(Arc::new(self), BitwiseAggFunction::Or))
}
pub fn bitwise_xor(self) -> Self {
Expr::Agg(AggExpr::Bitwise(Arc::new(self), BitwiseAggFunction::Xor))
}
}