Package net.snowflake.client.core.arrow

## Class ArrowVectorConverterUtil

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

    @SnowflakeJdbcInternalApi
    public final class ArrowVectorConverterUtil
    extends Object

### Method Summary

All Methods Static Methods Concrete Methods
`static SnowflakeType` `getSnowflakeTypeFromFieldMetadata​(org.apache.arrow.vector.types.pojo.Field field)`
`static ArrowVectorConverter` `initConverter​(org.apache.arrow.vector.FieldVector vector, DataConversionContext context, int columnIndex)`
`static ArrowVectorConverter` `initConverter​(org.apache.arrow.vector.ValueVector vector, DataConversionContext context, SFBaseSession session, int idx)` Given an arrow vector (a single column in a single record batch), return an arrow vector converter.

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

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

### Method Detail

#### getSnowflakeTypeFromFieldMetadata

    public static SnowflakeType getSnowflakeTypeFromFieldMetadata​(org.apache.arrow.vector.types.pojo.Field field)

#### initConverter

    public static ArrowVectorConverter initConverter​(org.apache.arrow.vector.ValueVector vector,
                                                     DataConversionContext context,
                                                     SFBaseSession session,
                                                     int idx)
                                              throws SnowflakeSQLException

Given an arrow vector (a single column in a single record batch), return an arrow vector converter. Note, converter is built on top of arrow vector, so that arrow data can be converted back to java data

Arrow converter mappings for Snowflake fixed-point numbers ----------------------------------------------------------------------------------------- Max position and scale Converter ----------------------------------------------------------------------------------------- number(3,0) `TinyIntToFixedConverter` number(3,2) `TinyIntToScaledFixedConverter` number(5,0) `SmallIntToFixedConverter` number(5,4) `SmallIntToScaledFixedConverter` number(10,0) `IntToFixedConverter` number(10,9) `IntToScaledFixedConverter` number(19,0) `BigIntToFixedConverter` number(19,18) `BigIntToFixedConverter` number(38,37) `DecimalToScaledFixedConverter` ------------------------------------------------------------------------------------------

Parameters:
  `vector` - an arrow vector
  `context` - data conversion context
  `session` - SFBaseSession for purposes of logging
  `idx` - the index of the vector in its batch
Returns:
  A converter on top og the vector
Throws:
  `SnowflakeSQLException`

#### initConverter

    public static ArrowVectorConverter initConverter​(org.apache.arrow.vector.FieldVector vector,
                                                     DataConversionContext context,
                                                     int columnIndex)
                                              throws SnowflakeSQLException

Throws:
  `SnowflakeSQLException`