What is Scala type mapping for all Spark SQL DataType

The various DataType available for Spark SQL can be found here . Can someone please tell me what the corresponding Java / Scala data type will be for each of Spark SQL DataType s?

+5
source share
1 answer

Directly from Spark SQL and DataFrame Guide :

 Data type | Value type in Scala ------------------------------------------------ ByteType | Byte ShortType | Short IntegerType | Int LongType | Long FloatType | Float DoubleType | Double DecimalType | java.math.BigDecimal StringType | String BinaryType | Array[Byte] BooleanType | Boolean TimestampType | java.sql.Timestamp DateType | java.sql.Date ArrayType | scala.collection.Seq MapType | scala.collection.Map StructType | org.apache.spark.sql.Row 
+10
source

Source: https://habr.com/ru/post/1232765/


All Articles