spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Hodefi <>
Subject spark datatypes
Date Sun, 03 Dec 2017 14:12:18 GMT
Looking on the source code, it seems like DateDataType  is Int.

"class DateType private() extends AtomicType {

  // The companion object and this class is separated so the companion
object also subclasses
  // this type. Otherwise, the companion object would be of type
"DateType$" in byte code.
  // Defined with a private constructor so the companion object is the
only possible instantiation.
  *private[sql] type InternalType = Int*


I know that Timestamp requires 10 digits that's why we use Long and not Int.

Can someone explain why InternalType is Int?

Thanks David

View raw message