Class TinyIntToFixedConverter

    • Field Detail

      • tinyIntVector

        protected org.apache.arrow.vector.TinyIntVector tinyIntVector
      • sfScale

        protected int sfScale
      • logicalTypeStr

        protected String logicalTypeStr
        snowflake logical type of the target arrow vector
      • columnIndex

        protected int columnIndex
      • treatNTZasUTC

        protected boolean treatNTZasUTC
      • useSessionTimezone

        protected boolean useSessionTimezone
      • sessionTimeZone

        protected TimeZone sessionTimeZone
      • FIELD_NAME_EPOCH

        public static final String FIELD_NAME_EPOCH
        Field names of the struct vectors used by timestamp
        See Also:
        Constant Field Values
    • Constructor Detail

      • TinyIntToFixedConverter

        public TinyIntToFixedConverter​(org.apache.arrow.vector.ValueVector fieldVector,
                                       int columnIndex,
                                       DataConversionContext context)
    • Method Detail

      • toByte

        public byte toByte​(int index)
                    throws SFException
        Description copied from interface: ArrowVectorConverter
        Convert value in arrow vector to byte data
        Specified by:
        toByte in interface ArrowVectorConverter
        Parameters:
        index - index of the value to be converted in the vector
        Returns:
        byte data converted from arrow vector
        Throws:
        SFException - invalid data conversion
      • toBytes

        public byte[] toBytes​(int index)
                       throws SFException
        Description copied from interface: ArrowVectorConverter
        Convert value in arrow vector to byte array
        Specified by:
        toBytes in interface ArrowVectorConverter
        Parameters:
        index - index of the value to be converted in the vector
        Returns:
        byte array converted from arrow vector
        Throws:
        SFException - invalid data conversion
      • toShort

        public short toShort​(int index)
                      throws SFException
        Description copied from interface: ArrowVectorConverter
        Convert value in arrow vector to short data
        Specified by:
        toShort in interface ArrowVectorConverter
        Parameters:
        index - index of the value to be converted in the vector
        Returns:
        short data converted from arrow vector
        Throws:
        SFException - invalid data conversion
      • toInt

        public int toInt​(int index)
                  throws SFException
        Description copied from interface: ArrowVectorConverter
        Convert value in arrow vector to int data
        Specified by:
        toInt in interface ArrowVectorConverter
        Parameters:
        index - index of the value to be converted in the vector
        Returns:
        int data converted from arrow vector
        Throws:
        SFException - invalid data conversion
      • toFloat

        public float toFloat​(int index)
                      throws SFException
        Description copied from interface: ArrowVectorConverter
        Convert value in arrow vector to float data
        Specified by:
        toFloat in interface ArrowVectorConverter
        Parameters:
        index - index of the value to be converted in the vector
        Returns:
        float data converted from arrow vector
        Throws:
        SFException - invalid data conversion
      • toDouble

        public double toDouble​(int index)
                        throws SFException
        Description copied from interface: ArrowVectorConverter
        Convert value in arrow vector to double data
        Specified by:
        toDouble in interface ArrowVectorConverter
        Parameters:
        index - index of the value to be converted in the vector
        Returns:
        double data converted from arrow vector
        Throws:
        SFException - invalid data conversion
      • toLong

        public long toLong​(int index)
                    throws SFException
        Description copied from interface: ArrowVectorConverter
        Convert value in arrow vector to long data
        Specified by:
        toLong in interface ArrowVectorConverter
        Parameters:
        index - index of the value to be converted in the vector
        Returns:
        long data converted from arrow vector
        Throws:
        SFException - invalid data conversion
      • toObject

        public Object toObject​(int index)
                        throws SFException
        Description copied from interface: ArrowVectorConverter
        Convert value in arrow vector to Object
        Specified by:
        toObject in interface ArrowVectorConverter
        Parameters:
        index - index of the value to be converted in the vector
        Returns:
        Object converted from arrow vector
        Throws:
        SFException - invalid data conversion
      • toString

        public String toString​(int index)
                        throws SFException
        Description copied from interface: ArrowVectorConverter
        Convert value in arrow vector to string
        Specified by:
        toString in interface ArrowVectorConverter
        Parameters:
        index - index of the value to be converted in the vector
        Returns:
        string converted from arrow vector
        Throws:
        SFException - invalid data conversion
      • toBoolean

        public boolean toBoolean​(int index)
                          throws SFException
        Description copied from interface: ArrowVectorConverter
        Convert value in arrow vector to boolean data
        Specified by:
        toBoolean in interface ArrowVectorConverter
        Parameters:
        index - index of the value to be converted in the vector
        Returns:
        boolean data converted from arrow vector
        Throws:
        SFException - invalid data conversion
      • toDate

        public Date toDate​(int index,
                           TimeZone jvmTz,
                           boolean useDateFormat)
                    throws SFException
        Description copied from interface: ArrowVectorConverter
        Convert value in arrow vector to Date
        Specified by:
        toDate in interface ArrowVectorConverter
        Parameters:
        index - index of the value to be converted in the vector
        jvmTz - JVM timezone
        useDateFormat - boolean value to check whether to change timezone or not
        Returns:
        Date converted from arrow vector
        Throws:
        SFException - invalid data conversion
      • toTime

        public Time toTime​(int index)
                    throws SFException
        Description copied from interface: ArrowVectorConverter
        Convert value in arrow vector to Time
        Specified by:
        toTime in interface ArrowVectorConverter
        Parameters:
        index - index of the value to be converted in the vector
        Returns:
        Time converted from arrow vector
        Throws:
        SFException - invalid data conversion
      • setTreatNTZAsUTC

        public void setTreatNTZAsUTC​(boolean isUTC)
        Specified by:
        setTreatNTZAsUTC in interface ArrowVectorConverter
        Parameters:
        isUTC - true or false value of whether NTZ timestamp should be set to UTC
      • setUseSessionTimezone

        public void setUseSessionTimezone​(boolean useSessionTimezone)
        Description copied from interface: ArrowVectorConverter
        Set to true when time value should be displayed in wallclock time (no timezone offset)
        Specified by:
        setUseSessionTimezone in interface ArrowVectorConverter
      • isNull

        public boolean isNull​(int index)
        Description copied from interface: ArrowVectorConverter
        Determine whether source value in arrow vector is null value or not
        Specified by:
        isNull in interface ArrowVectorConverter
        Parameters:
        index - index of value to be checked
        Returns:
        true if null value otherwise false