T
- The input type expected for this expression. Can be Any
if the expression is type
checked by the analyzer instead of the compiler (i.e. expr("sum(...)")
).U
- The output type of this column.
public class TypedColumn<T,U> extends Column
Column
where an Encoder
has been given for the expected input and return type.
To create a TypedColumn
, use the as
function on a Column
.
Constructor and Description |
---|
TypedColumn(org.apache.spark.sql.catalyst.expressions.Expression expr,
org.apache.spark.sql.catalyst.encoders.ExpressionEncoder<U> encoder) |
Modifier and Type | Method and Description |
---|---|
TypedColumn<T,U> |
name(String alias)
Gives the
TypedColumn a name (alias). |
alias, and, apply, as, as, as, as, as, as, asc_nulls_first, asc_nulls_last, asc, between, bitwiseAND, bitwiseOR, bitwiseXOR, cast, cast, contains, desc_nulls_first, desc_nulls_last, desc, divide, dropFields, endsWith, endsWith, eqNullSafe, equals, equalTo, explain, expr, geq, getField, getItem, gt, hashCode, ilike, isin, isin, isInCollection, isInCollection, isNaN, isNotNull, isNull, leq, like, lt, minus, mod, multiply, notEqual, or, otherwise, over, over, plus, rlike, startsWith, startsWith, substr, substr, toString, unapply, when, withField
$init$, initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, initLock, isTraceEnabled, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning, org$apache$spark$internal$Logging$$log__$eq, org$apache$spark$internal$Logging$$log_, uninitialize
public TypedColumn(org.apache.spark.sql.catalyst.expressions.Expression expr, org.apache.spark.sql.catalyst.encoders.ExpressionEncoder<U> encoder)
public TypedColumn<T,U> name(String alias)
TypedColumn
a name (alias).
If the current TypedColumn
has metadata associated with it, this metadata will be propagated
to the new column.