public class DateTimeMath extends Object
Modifier and Type | Field and Description |
---|---|
protected Calendar |
calLocal |
protected Calendar |
calUtc |
protected org.apache.hadoop.hive.ql.util.DateTimeMath.NanosResult |
nanosResult |
Constructor and Description |
---|
DateTimeMath() |
Modifier and Type | Method and Description |
---|---|
Date |
add(Date dt,
HiveIntervalYearMonth interval) |
boolean |
add(Date dt,
HiveIntervalYearMonth interval,
Date result) |
org.apache.hadoop.hive.common.type.HiveIntervalDayTime |
add(org.apache.hadoop.hive.common.type.HiveIntervalDayTime left,
org.apache.hadoop.hive.common.type.HiveIntervalDayTime right) |
boolean |
add(org.apache.hadoop.hive.common.type.HiveIntervalDayTime left,
org.apache.hadoop.hive.common.type.HiveIntervalDayTime right,
org.apache.hadoop.hive.common.type.HiveIntervalDayTime result) |
Timestamp |
add(org.apache.hadoop.hive.common.type.HiveIntervalDayTime interval,
Timestamp ts) |
boolean |
add(org.apache.hadoop.hive.common.type.HiveIntervalDayTime interval,
Timestamp ts,
Timestamp result) |
Date |
add(HiveIntervalYearMonth interval,
Date dt) |
boolean |
add(HiveIntervalYearMonth interval,
Date dt,
Date result) |
HiveIntervalYearMonth |
add(HiveIntervalYearMonth left,
HiveIntervalYearMonth right) |
Timestamp |
add(HiveIntervalYearMonth interval,
Timestamp ts) |
boolean |
add(HiveIntervalYearMonth interval,
Timestamp ts,
Timestamp result) |
Timestamp |
add(Timestamp ts,
org.apache.hadoop.hive.common.type.HiveIntervalDayTime interval) |
boolean |
add(Timestamp ts,
org.apache.hadoop.hive.common.type.HiveIntervalDayTime interval,
Timestamp result) |
Timestamp |
add(Timestamp ts,
HiveIntervalYearMonth interval) |
boolean |
add(Timestamp ts,
HiveIntervalYearMonth interval,
Timestamp result) |
long |
addMonthsToDays(long days,
int months) |
long |
addMonthsToMillisLocal(long millis,
int months)
Perform month arithmetic to millis value using local time zone.
|
long |
addMonthsToMillisUtc(long millis,
int months)
Perform month arithmetic to millis value using UTC time zone.
|
long |
addMonthsToNanosLocal(long nanos,
int months) |
long |
addMonthsToNanosUtc(long nanos,
int months) |
Date |
subtract(Date left,
HiveIntervalYearMonth right) |
boolean |
subtract(Date left,
HiveIntervalYearMonth right,
Date result) |
org.apache.hadoop.hive.common.type.HiveIntervalDayTime |
subtract(org.apache.hadoop.hive.common.type.HiveIntervalDayTime left,
org.apache.hadoop.hive.common.type.HiveIntervalDayTime right) |
boolean |
subtract(org.apache.hadoop.hive.common.type.HiveIntervalDayTime left,
org.apache.hadoop.hive.common.type.HiveIntervalDayTime right,
org.apache.hadoop.hive.common.type.HiveIntervalDayTime result) |
HiveIntervalYearMonth |
subtract(HiveIntervalYearMonth left,
HiveIntervalYearMonth right) |
Timestamp |
subtract(Timestamp left,
org.apache.hadoop.hive.common.type.HiveIntervalDayTime right) |
boolean |
subtract(Timestamp left,
org.apache.hadoop.hive.common.type.HiveIntervalDayTime right,
Timestamp result) |
Timestamp |
subtract(Timestamp left,
HiveIntervalYearMonth right) |
boolean |
subtract(Timestamp left,
HiveIntervalYearMonth right,
Timestamp result) |
org.apache.hadoop.hive.common.type.HiveIntervalDayTime |
subtract(Timestamp left,
Timestamp right) |
boolean |
subtract(Timestamp left,
Timestamp right,
org.apache.hadoop.hive.common.type.HiveIntervalDayTime result) |
protected Calendar calUtc
protected Calendar calLocal
protected org.apache.hadoop.hive.ql.util.DateTimeMath.NanosResult nanosResult
public long addMonthsToMillisUtc(long millis, int months)
millis
- months
- public long addMonthsToMillisLocal(long millis, int months)
millis
- months
- public long addMonthsToNanosUtc(long nanos, int months)
public long addMonthsToNanosLocal(long nanos, int months)
public long addMonthsToDays(long days, int months)
public Timestamp add(Timestamp ts, HiveIntervalYearMonth interval)
public boolean add(Timestamp ts, HiveIntervalYearMonth interval, Timestamp result)
public Timestamp add(HiveIntervalYearMonth interval, Timestamp ts)
public boolean add(HiveIntervalYearMonth interval, Timestamp ts, Timestamp result)
public Date add(Date dt, HiveIntervalYearMonth interval)
public boolean add(Date dt, HiveIntervalYearMonth interval, Date result)
public Date add(HiveIntervalYearMonth interval, Date dt)
public boolean add(HiveIntervalYearMonth interval, Date dt, Date result)
public HiveIntervalYearMonth add(HiveIntervalYearMonth left, HiveIntervalYearMonth right)
public Timestamp subtract(Timestamp left, HiveIntervalYearMonth right)
public boolean subtract(Timestamp left, HiveIntervalYearMonth right, Timestamp result)
public Date subtract(Date left, HiveIntervalYearMonth right)
public boolean subtract(Date left, HiveIntervalYearMonth right, Date result)
public HiveIntervalYearMonth subtract(HiveIntervalYearMonth left, HiveIntervalYearMonth right)
public Timestamp add(Timestamp ts, org.apache.hadoop.hive.common.type.HiveIntervalDayTime interval)
public boolean add(Timestamp ts, org.apache.hadoop.hive.common.type.HiveIntervalDayTime interval, Timestamp result)
public Timestamp add(org.apache.hadoop.hive.common.type.HiveIntervalDayTime interval, Timestamp ts)
public boolean add(org.apache.hadoop.hive.common.type.HiveIntervalDayTime interval, Timestamp ts, Timestamp result)
public org.apache.hadoop.hive.common.type.HiveIntervalDayTime add(org.apache.hadoop.hive.common.type.HiveIntervalDayTime left, org.apache.hadoop.hive.common.type.HiveIntervalDayTime right)
public boolean add(org.apache.hadoop.hive.common.type.HiveIntervalDayTime left, org.apache.hadoop.hive.common.type.HiveIntervalDayTime right, org.apache.hadoop.hive.common.type.HiveIntervalDayTime result)
public Timestamp subtract(Timestamp left, org.apache.hadoop.hive.common.type.HiveIntervalDayTime right)
public boolean subtract(Timestamp left, org.apache.hadoop.hive.common.type.HiveIntervalDayTime right, Timestamp result)
public org.apache.hadoop.hive.common.type.HiveIntervalDayTime subtract(org.apache.hadoop.hive.common.type.HiveIntervalDayTime left, org.apache.hadoop.hive.common.type.HiveIntervalDayTime right)
public boolean subtract(org.apache.hadoop.hive.common.type.HiveIntervalDayTime left, org.apache.hadoop.hive.common.type.HiveIntervalDayTime right, org.apache.hadoop.hive.common.type.HiveIntervalDayTime result)
public org.apache.hadoop.hive.common.type.HiveIntervalDayTime subtract(Timestamp left, Timestamp right)
Copyright © 2021 The Apache Software Foundation. All rights reserved.