Package org.apache.spark.sql
Class TypedColumn<T,U>
Object
org.apache.spark.sql.Column
org.apache.spark.sql.TypedColumn<T,U>
- Type Parameters:
T
- The input type expected for this expression. Can beAny
if the expression is type checked by the analyzer instead of the compiler (i.e.expr("sum(...)")
).U
- The output type of this column.
- All Implemented Interfaces:
org.apache.spark.internal.Logging
A
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
.
- Since:
- 1.6.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.spark.internal.Logging
org.apache.spark.internal.Logging.SparkShellLoggingFilter
-
Constructor Summary
ConstructorDescriptionTypedColumn
(org.apache.spark.sql.catalyst.expressions.Expression expr, org.apache.spark.sql.catalyst.encoders.ExpressionEncoder<U> encoder) -
Method Summary
Methods inherited from class org.apache.spark.sql.Column
alias, and, apply, as, as, as, as, as, as, asc, asc_nulls_first, asc_nulls_last, between, bitwiseAND, bitwiseOR, bitwiseXOR, cast, cast, contains, desc, desc_nulls_first, desc_nulls_last, 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
Methods inherited from interface org.apache.spark.internal.Logging
initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, isTraceEnabled, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning, org$apache$spark$internal$Logging$$log_, org$apache$spark$internal$Logging$$log__$eq
-
Constructor Details
-
TypedColumn
public TypedColumn(org.apache.spark.sql.catalyst.expressions.Expression expr, org.apache.spark.sql.catalyst.encoders.ExpressionEncoder<U> encoder)
-
-
Method Details
-
name
Gives theTypedColumn
a name (alias). If the currentTypedColumn
has metadata associated with it, this metadata will be propagated to the new column.
-