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)]");