public class ArrowResultUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_SCALE_POWERS_OF_10 |
| Constructor and Description |
|---|
ArrowResultUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Timestamp |
createTimestamp(long seconds,
int fraction,
TimeZone timezone,
boolean useSessionTz)
create Java timestamp using seconds since epoch and fraction in nanoseconds For example,
1232.234 represents as epoch = 1232 and fraction = 234,000,000 For example, -1232.234
represents as epoch = -1233 and fraction = 766,000,000 For example, -0.13 represents as epoch =
-1 and fraction = 870,000,000
|
static Date |
getDate(int day)
new method to get Date from integer
|
static Date |
getDate(int day,
TimeZone oldTz,
TimeZone newTz)
Method to get Date from integer using timezone offsets
|
static String |
getStringFormat(int scale) |
static boolean |
isTimestampOverflow(long seconds)
check whether the input seconds out of the scope of Java timestamp
|
static Timestamp |
moveToTimeZone(Timestamp ts,
TimeZone oldTZ,
TimeZone newTZ)
move the input timestamp form oldTZ to newTZ
|
static long |
powerOfTen(int pow) |
static Timestamp |
toJavaTimestamp(long epoch,
int scale)
generate Java Timestamp object
|
public static final int MAX_SCALE_POWERS_OF_10
public static long powerOfTen(int pow)
public static String getStringFormat(int scale)
public static Date getDate(int day)
day - public static Date getDate(int day, TimeZone oldTz, TimeZone newTz) throws SFException
day - oldTz - newTz - SFExceptionpublic static Timestamp moveToTimeZone(Timestamp ts, TimeZone oldTZ, TimeZone newTZ)
ts - oldTZ - newTZ - public static Timestamp toJavaTimestamp(long epoch, int scale)
epoch - the value since epoch timescale - the scale of the valuepublic static boolean isTimestampOverflow(long seconds)
seconds - public static Timestamp createTimestamp(long seconds, int fraction, TimeZone timezone, boolean useSessionTz)
seconds - fraction - timezone - - The timezone being used for the toString() formattingtimezone - -Copyright © 2022. All rights reserved.