Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use Long to store timestamp for rows.
  • Loading branch information
viirya committed Jun 11, 2015
commit a463e8372cbaf67de6c4674bc999350fa6c0c039
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class GenericRow(protected[sql] val values: Array[Any]) extends Row {
override def getTimestamp(i: Int): java.sql.Timestamp = {
values(i) match {
case null => null
case t: java.sql.Timestamp => t
case l: Long => DateUtils.toJavaTimestamp(l)
}
}

Expand Down Expand Up @@ -227,7 +227,7 @@ class GenericMutableRow(v: Array[Any]) extends GenericRow(v) with MutableRow {
}

override def setTimestamp(ordinal: Int, value: java.sql.Timestamp): Unit = {
values(ordinal) = value
values(ordinal) = DateUtils.fromJavaTimestamp(value)
}

override def setNullAt(i: Int): Unit = { values(i) = null }
Expand Down