Class Smalls.AllTypesFunction

  • Enclosing class:
    Smalls

    public static class Smalls.AllTypesFunction
    extends java.lang.Object
    UDF class that provides user-defined functions for each data type.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private AllTypesFunction()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List arrayAppendFun​(java.util.List v, java.lang.Integer i)  
      static long dateFun​(java.sql.Date v)  
      static long timeFun​(java.sql.Time v)  
      static long timestampFun​(java.sql.Timestamp v)  
      static java.sql.Date toDateFun​(int v)
      Overloaded, in a challenging way, with toDateFun(Long).
      static java.sql.Date toDateFun​(java.lang.Long v)  
      static double toDouble​(java.lang.Double var)  
      static double toDouble​(java.lang.Float var)  
      static double toDouble​(java.math.BigDecimal var)
      for Overloaded user-defined functions that have Double and BigDecimal arguments will goes wrong
      static long toLong​(java.sql.Date date)
      Overloaded functions with DATE, TIMESTAMP and TIME arguments.
      static long toLong​(java.sql.Time time)  
      static long toLong​(java.sql.Timestamp timestamp)  
      static java.sql.Time toTimeFun​(java.lang.Long v)  
      static java.sql.Timestamp toTimestampFun​(java.lang.Long v)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AllTypesFunction

        private AllTypesFunction()
    • Method Detail

      • dateFun

        public static long dateFun​(java.sql.Date v)
      • timestampFun

        public static long timestampFun​(java.sql.Timestamp v)
      • timeFun

        public static long timeFun​(java.sql.Time v)
      • toDateFun

        public static java.sql.Date toDateFun​(int v)
        Overloaded, in a challenging way, with toDateFun(Long).
      • toDateFun

        public static java.sql.Date toDateFun​(java.lang.Long v)
      • toTimestampFun

        public static java.sql.Timestamp toTimestampFun​(java.lang.Long v)
      • toTimeFun

        public static java.sql.Time toTimeFun​(java.lang.Long v)
      • toDouble

        public static double toDouble​(java.math.BigDecimal var)
        for Overloaded user-defined functions that have Double and BigDecimal arguments will goes wrong
      • toDouble

        public static double toDouble​(java.lang.Double var)
      • toDouble

        public static double toDouble​(java.lang.Float var)
      • arrayAppendFun

        public static java.util.List arrayAppendFun​(java.util.List v,
                                                    java.lang.Integer i)
      • toLong

        public static long toLong​(java.sql.Date date)
        Overloaded functions with DATE, TIMESTAMP and TIME arguments.
      • toLong

        public static long toLong​(java.sql.Timestamp timestamp)
      • toLong

        public static long toLong​(java.sql.Time time)