Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ object IntervalUtils {
final val MICROS_PER_MINUTE: Long =
DateTimeUtils.MILLIS_PER_MINUTE * DateTimeUtils.MICROS_PER_MILLIS
final val DAYS_PER_MONTH: Byte = 30
final val MICROS_PER_MONTH: Long = DAYS_PER_MONTH * DateTimeUtils.SECONDS_PER_DAY
final val MICROS_PER_MONTH: Long = DAYS_PER_MONTH * DateTimeUtils.MICROS_PER_DAY
/* 365.25 days per year assumes leap year every four years */
final val MICROS_PER_YEAR: Long = (36525L * DateTimeUtils.MICROS_PER_DAY) / 100

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ select date_part('epoch', c) from t2
-- !query 106 schema
struct<date_part('epoch', t2.`c`):decimal(18,6)>
-- !query 106 output
31873892788.332003
31897220765.004003
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have compared to PostgreSQL output:

maxim=# select date_part('epoch', interval '1010 year 9 month 8 day 7 hour 6 minute 5 second 4 millisecond 3 microseconds');
    date_part
-----------------
 31897220765.004
(1 row)

It seems PostgreSQL just looses the precision.



-- !query 107
Expand Down