datafusion_functions_nested::expr_ext

Trait IndexAccessor

Source
pub trait IndexAccessor {
    // Required method
    fn index(self, key: Expr) -> Expr;
}
Expand description

Return access to the element field. Example expr["name"]

§Example Access element 2 from column “c1”

For example if column “c1” holds documents like this

[10, 20, 30, 40]

You can access the value “30” with

let expr = col("c1")
   .index(lit(3));
assert_eq!(expr.schema_name().to_string(), "c1[Int32(3)]");

Required Methods§

Source

fn index(self, key: Expr) -> Expr

Implementations on Foreign Types§

Source§

impl IndexAccessor for Expr

Source§

fn index(self, key: Expr) -> Expr

Implementors§