YMajid commented on a change in pull request #28886:
URL: https://github.com/apache/spark/pull/28886#discussion_r443267050
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -1994,13 +1994,17 @@ case class MakeTimestamp(
day: Int,
hour: Int,
min: Int,
- secAndNanos: Decimal,
+ secAndMicros: Decimal,
zoneId: ZoneId): Any = {
try {
- val secFloor = secAndNanos.floor
- val nanosPerSec = Decimal(NANOS_PER_SECOND, 10, 0)
- val nanos = ((secAndNanos - secFloor) * nanosPerSec).toInt
- val seconds = secFloor.toInt
+ assert(secAndMicros.scale == 6,
Review comment:
I doubt that this is the right place to ask, but I tried to Google this
but didn't find anything. I was just wondering what does
`assert(secAndMicros.scale == 6` do exactly? I am assuming that it changes the
Decimal's scale to 6, but what does that exactly help with? And is the added
tail just a bunch of zeros? For instance does 3.14 become 3.140000?
Thanks!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]