SparkSQL
2017-07-27 本文已影响0人
红袖者
1、Schema的定义
通过StructType和StructField等API来定义Schema。
StructType的构造器:new StructType(fields: Seq[StructField])
StructField的构造器:new StructField(name: String, dataType: DataType, nullable: Boolean)
其中StructType继承DataType。