Class ColumnName

Object
org.apache.spark.sql.Column
org.apache.spark.sql.ColumnName
All Implemented Interfaces:
org.apache.spark.internal.Logging

public class ColumnName extends Column
A convenient class used for constructing schema.

Since:
1.3.0
  • Constructor Details

    • ColumnName

      public ColumnName(String name)
  • Method Details

    • array

      public StructField array(DataType dataType)
      Creates a new StructField of type array.
      Parameters:
      dataType - (undocumented)
      Returns:
      (undocumented)
      Since:
      1.3.0
    • binary

      public StructField binary()
      Creates a new StructField of type binary.
      Returns:
      (undocumented)
      Since:
      1.3.0
    • date

      public StructField date()
      Creates a new StructField of type date.
      Returns:
      (undocumented)
      Since:
      1.3.0
    • decimal

      public StructField decimal()
      Creates a new StructField of type decimal.
      Returns:
      (undocumented)
      Since:
      1.3.0
    • decimal

      public StructField decimal(int precision, int scale)
      Creates a new StructField of type decimal.
      Parameters:
      precision - (undocumented)
      scale - (undocumented)
      Returns:
      (undocumented)
      Since:
      1.3.0
    • map

      public StructField map(DataType keyType, DataType valueType)
      Creates a new StructField of type map.
      Parameters:
      keyType - (undocumented)
      valueType - (undocumented)
      Returns:
      (undocumented)
      Since:
      1.3.0
    • map

      public StructField map(MapType mapType)
    • string

      public StructField string()
      Creates a new StructField of type string.
      Returns:
      (undocumented)
      Since:
      1.3.0
    • struct

      public StructField struct(scala.collection.Seq<StructField> fields)
      Creates a new StructField of type struct.
      Parameters:
      fields - (undocumented)
      Returns:
      (undocumented)
      Since:
      1.3.0
    • struct

      public StructField struct(StructType structType)
      Creates a new StructField of type struct.
      Parameters:
      structType - (undocumented)
      Returns:
      (undocumented)
      Since:
      1.3.0
    • timestamp

      public StructField timestamp()
      Creates a new StructField of type timestamp.
      Returns:
      (undocumented)
      Since:
      1.3.0