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
FieldAccessor in datafusion::functions::core::expr_ext - Rust
[go: Go Back, main page]

Trait FieldAccessor

Source
pub trait FieldAccessor {
    // Required method
    fn field(self, name: impl Literal) -> Expr;
}
Expand description

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

§Access field “my_field” from column “c1”

For example if column “c1” holds documents like this

{
  "my_field": 123.34,
  "other_field": "Boston",
}

You can access column “my_field” with

let expr = col("c1")
   .field("my_field");
assert_eq!(expr.schema_name().to_string(), "c1[my_field]");

Required Methods§

Source

fn field(self, name: impl Literal) -> Expr

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§