MCPcopy Create free account
hub / github.com/apache/datafusion / get_as_join_column

Method get_as_join_column

datafusion/expr/src/expr.rs:2035–2044  ·  view source on GitHub ↗

Returns the inner `Column` if any. This is a specialized version of [`Self::try_as_col`] that take Cast expressions into account when the expression is as on condition for joins. Called this method when you are sure that the expression is a `Column` or a `Cast` expression that wraps a `Column`.

(&self)

Source from the content-addressed store, hash-verified

2033 /// Called this method when you are sure that the expression is a `Column`
2034 /// or a `Cast` expression that wraps a `Column`.
2035 pub fn get_as_join_column(&self) -> Option<&Column> {
2036 match self {
2037 Expr::Column(c) => Some(c),
2038 Expr::Cast(Cast { expr, .. }) => match &**expr {
2039 Expr::Column(c) => Some(c),
2040 _ => None,
2041 },
2042 _ => None,
2043 }
2044 }
2045
2046 /// Return all references to columns in this expression.
2047 ///

Callers 1

using_columnsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected