Class Smalls.AllTypesFunction

java.lang.Object
org.apache.calcite.util.Smalls.AllTypesFunction
Enclosing class:
Smalls

public static class Smalls.AllTypesFunction extends Object
UDF class that provides user-defined functions for each data type.
  • Method Details

    • dateFun

      public static long dateFun(Date v)
    • timestampFun

      public static long timestampFun(Timestamp v)
    • timeFun

      public static long timeFun(Time v)
    • toDateFun

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

      public static Date toDateFun(Long v)
    • toTimestampFun

      public static Timestamp toTimestampFun(Long v)
    • toTimeFun

      public static Time toTimeFun(Long v)
    • toDouble

      public static double toDouble(BigDecimal var)
      For overloaded user-defined functions that have double and BigDecimal arguments will go wrong.
    • toDouble

      public static double toDouble(Double var)
    • toDouble

      public static double toDouble(Float var)
    • arrayAppendFun

      public static List arrayAppendFun(List v, Integer i)
    • toLong

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

      public static long toLong(Timestamp timestamp)
    • toLong

      public static long toLong(Time time)