org.apache.spark.sql
Class ColumnName

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

public class ColumnName
extends Column

:: Experimental :: A convenient class used for constructing schema.

Since:
1.3.0

Constructor Summary
ColumnName(String name)
           
 
Method Summary
 StructField array(DataType dataType)
          Creates a new StructField of type array.
 StructField binary()
          Creates a new StructField of type binary.
 StructField date()
          Creates a new StructField of type date.
 StructField decimal()
          Creates a new StructField of type decimal.
 StructField decimal(int precision, int scale)
          Creates a new StructField of type decimal.
 StructField map(DataType keyType, DataType valueType)
          Creates a new StructField of type map.
 StructField map(MapType mapType)
           
 StructField string()
          Creates a new StructField of type string.
 StructField struct(scala.collection.Seq<StructField> fields)
          Creates a new StructField of type struct.
 StructField struct(StructType structType)
          Creates a new StructField of type struct.
 StructField timestamp()
          Creates a new StructField of type timestamp.
 
Methods inherited from class org.apache.spark.sql.Column
alias, and, apply, as, as, as, as, as, asc, between, bitwiseAND, bitwiseOR, bitwiseXOR, cast, cast, contains, desc, divide, endsWith, endsWith, eqNullSafe, equals, equalTo, explain, geq, getField, getItem, gt, hashCode, in, in, isNotNull, isNull, leq, like, lt, minus, mod, multiply, notEqual, or, otherwise, over, plus, rlike, startsWith, startsWith, substr, substr, toString, unapply, when
 
Methods inherited from class Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.spark.Logging
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
 

Constructor Detail

ColumnName

public ColumnName(String name)
Method Detail

string

public StructField string()
Creates a new StructField of type string.

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

timestamp

public StructField timestamp()
Creates a new StructField of type timestamp.

Returns:
(undocumented)
Since:
1.3.0

binary

public StructField binary()
Creates a new StructField of type binary.

Returns:
(undocumented)
Since:
1.3.0

array

public StructField array(DataType dataType)
Creates a new StructField of type array.

Parameters:
dataType - (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)

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