Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
SliceAccessor in datafusion::functions_array::expr_ext - Rust
[go: Go Back, main page]

Trait datafusion::functions_array::expr_ext::SliceAccessor

source ·
pub trait SliceAccessor {
    // Required method
    fn range(self, start: Expr, stop: Expr) -> Expr;
}
Expand description

Return elements between 1 based start and stop, for example expr[1:3]

§Example: Access element 2, 3, 4 from column “c1”

For example if column “c1” holds documents like this

[10, 20, 30, 40]

You can access the value [20, 30, 40] with

let expr = col("c1")
   .range(lit(2), lit(4));
assert_eq!(expr.display_name().unwrap(), "c1[Int32(2):Int32(4)]");

Required Methods§

source

fn range(self, start: Expr, stop: Expr) -> Expr

Implementors§