Module spark_connect_rs::expressions
source · Expand description
The spark-connect-rs crate is currently just a meta-package shim for spark-connect-core Traits for converting Rust Types to Spark Connect Expression Types
Spark Connect has a few different ways of creating expressions and different gRPC methods require expressions in different forms. These traits are used to either translate a value into a spark::Expression or into a spark::expression::Literal.
§Overview
- ToExpr accepts a
&str
,String
, or Column. This trait uses the methodfrom
on the Column to create an expression. - ToLiteral is used for taking rust types into a spark::expression::Literal. These values are then converted into an expression
- ToLiteralExpr` takes a literal value and converts it into a spark::Expression
- ToVecExpr many gRPC methods require a
Vec<spark::Expression>
this trait is a shorthand for that transformation - ToFilterExpr is specifically used for filter statements
Traits§
- Translate string values into a
spark::Expression
- Create a filter expression
- Translate a rust value into a literal type
- Wrap a literal value into a
spark::Expression
- Translate values into a
Vec<spark::Expression>