net.snowflake.client.core.arrow

## Class ArrowResultUtil

- java.lang.Object
- - net.snowflake.client.core.arrow.ArrowResultUtil

    public class ArrowResultUtil
    extends Object

Result utility methods specifically for Arrow format

### Field Summary

Fields
`static int` `MAX_SCALE_POWERS_OF_10`

### Constructor Summary

Constructors
Constructor and Description
`ArrowResultUtil()`

### Method Summary

All Methods Static Methods Concrete Methods
`static Timestamp` `createTimestamp(long epoch, int fraction)` create Java timestamp using seconds since epoch and fraction in nanoseconds For example, -1232.234 represents as epoch = -1232 and fraction = 234,000,000
`static Date` `getDate(int day, TimeZone tz, SFSession session)` new method to get Date from integer
`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 int` `powerOfTen(int pow)`
`static Timestamp` `toJavaTimestamp(long epoch, int scale)` generate Java Timestamp object

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### MAX_SCALE_POWERS_OF_10

    public static final int MAX_SCALE_POWERS_OF_10

See Also:
  Constant Field Values

### Constructor Detail

#### ArrowResultUtil

    public ArrowResultUtil()

### Method Detail

#### powerOfTen

    public static int powerOfTen(int pow)

#### getStringFormat

    public static String getStringFormat(int scale)

#### getDate

    public static Date getDate(int day,
                               TimeZone tz,
                               SFSession session)
                        throws SFException

new method to get Date from integer

Parameters:
  `day` -
  `tz` -
  `session` -
Returns:
Throws:
  `SFException`

#### moveToTimeZone

    public static Timestamp moveToTimeZone(Timestamp ts,
                                           TimeZone oldTZ,
                                           TimeZone newTZ)

move the input timestamp form oldTZ to newTZ

Parameters:
  `ts` -
  `oldTZ` -
  `newTZ` -
Returns:
  timestamp in newTZ

#### toJavaTimestamp

    public static Timestamp toJavaTimestamp(long epoch,
                                            int scale)

generate Java Timestamp object

Parameters:
  `epoch` - the value since epoch time
  `scale` - the scale of the value
Returns:

#### isTimestampOverflow

    public static boolean isTimestampOverflow(long seconds)

check whether the input seconds out of the scope of Java timestamp

Parameters:
  `seconds` -
Returns:

#### createTimestamp

    public static Timestamp createTimestamp(long epoch,
                                            int fraction)

create Java timestamp using seconds since epoch and fraction in nanoseconds For example, -1232.234 represents as epoch = -1232 and fraction = 234,000,000

Parameters:
  `epoch` -
  `fraction` -
Returns: