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 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.

All Implemented Interfaces:
org.apache.spark.internal.Logging

public class TypedColumn<T,U> extends Column
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
  • 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

      public TypedColumn<T,U> name(String alias)
      Gives the TypedColumn a name (alias). If the current TypedColumn has metadata associated with it, this metadata will be propagated to the new column.

      Overrides:
      name in class Column
      Parameters:
      alias - (undocumented)
      Returns:
      (undocumented)
      Since:
      2.0.0