Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxGekk committed May 20, 2020
1 parent 5222a0a commit 31e8ffd
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ class FractionTimestampFormatter(zoneId: ZoneId)
@transient
override protected lazy val formatter = DateTimeFormatterHelper.fractionFormatter

// Converts Timestamp to string according to Hive TimestampWritable convention.
// The code is borrowed from Spark 2.4 DateTimeUtils.timestampToString
// The new formatter will omit the trailing 0 in the timestamp string, but the legacy formatter
// can't. Here we borrow the code from Spark 2.4 DateTimeUtils.timestampToString to omit the
// trailing 0 for the legacy formatter as well.
override def format(ts: Timestamp): String = {
val timestampString = ts.toString
val formatted = legacyFormatter.format(ts)
Expand Down

0 comments on commit 31e8ffd

Please sign in to comment.