-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Joda Time, periods cannot deal with starts and ends that have a difference > 1 month see:http://stackoverflow.com/questions/8793475/joda-time-all-in-minutes
This line therefore:
results in
Caused by: java.lang.UnsupportedOperationException: Cannot convert to Duration as this period contains months and months vary in length
at org.joda.time.Period.checkYearsAndMonths(Period.java:1567)
at org.joda.time.Period.toStandardDuration(Period.java:1549)
at org.sparklinedata.spark.dateTime.FunctionsExt$timeBucketFn$.apply(FunctionsExt.scala:400)
perhaps this needs to be changed to use something like:
val d0: Duration = p.toStandardDuration
assert((dt.getMillis>origin.getMillis))
FieldUtils.safeDivide((dt.getMillis-origin.getMillis), d0.getMillis)
Metadata
Metadata
Assignees
Labels
No labels