polars-plan 0.54.1

Lazy query engine for the Polars DataFrame library
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use super::*;

/// Specialized expressions for Categorical dtypes.
pub struct ExtensionNameSpace(pub(crate) Expr);

impl ExtensionNameSpace {
    pub fn to(self, dtype: impl Into<DataTypeExpr>) -> Expr {
        self.0.map_unary(ExtensionFunction::To(dtype.into()))
    }

    pub fn storage(self) -> Expr {
        self.0.map_unary(ExtensionFunction::Storage)
    }
}