/** Converts the Java type used for UDF parameters of SQL TIMESTAMP type * ({@link java.sql.Timestamp}) to internal representation (long). * * <p>Converse of {@link #internalToTimestamp(long)}. */ public static long toLong(Timestamp v) { return toLong(v, LOCAL_TZ); }
/** Converts the Java type used for UDF parameters of SQL TIME type * ({@link java.sql.Time}) to internal representation (int). * * <p>Converse of {@link #internalToTime(int)}. */ public static int toInt(java.sql.Time v) { return (int) (toLong(v) % DateTimeUtils.MILLIS_PER_DAY); }
/** Converts the Java type used for UDF parameters of SQL TIMESTAMP type * ({@link java.sql.Timestamp}) to internal representation (long). * * <p>Converse of {@link #internalToTimestamp(long)}. */ public static long toLong(Timestamp v) { return toLong(v, LOCAL_TZ); }
/** Converts the Java type used for UDF parameters of SQL TIME type * ({@link java.sql.Time}) to internal representation (int). * * <p>Converse of {@link #internalToTime(int)}. */ public static int toInt(java.sql.Time v) { return (int) (toLong(v) % DateTimeUtils.MILLIS_PER_DAY); }
public static Long toLongOptional(Timestamp v, TimeZone timeZone) { if (v == null) { return null; } return toLong(v, LOCAL_TZ); }
/** Converts the Java type used for UDF parameters of SQL TIMESTAMP type * ({@link java.sql.Timestamp}) to internal representation (long). * * <p>Converse of {@link #internalToTimestamp(long)}. */ public static long toLong(Timestamp v) { return toLong(v, LOCAL_TZ); }
public static Long toLongOptional(Timestamp v, TimeZone timeZone) { if (v == null) { return null; } return toLong(v, LOCAL_TZ); }
/** Converts the Java type used for UDF parameters of SQL TIME type * ({@link java.sql.Time}) to internal representation (int). * * <p>Converse of {@link #internalToTime(int)}. */ public static int toInt(java.sql.Time v) { return (int) (toLong(v) % DateTimeUtils.MILLIS_PER_DAY); }
public static Long toLongOptional(Timestamp v, TimeZone timeZone) { if (v == null) { return null; } return toLong(v, LOCAL_TZ); }
public static long toLong(Date v) { return toLong(v, LOCAL_TZ); }
public static long toLong(Timestamp timestamp) { return timestamp == null ? 0 : SqlFunctions.toLong(timestamp); }
public static long timestampFun(java.sql.Timestamp v) { return v == null ? -1L : SqlFunctions.toLong(v); } public static long timeFun(java.sql.Time v) {
/** Overloaded functions with DATE, TIMESTAMP and TIME arguments. */ public static long toLong(Date date) { return date == null ? 0 : SqlFunctions.toLong(date); }
public static long dateFun(java.sql.Date v) { return v == null ? -1L : SqlFunctions.toLong(v); } public static long timestampFun(java.sql.Timestamp v) {
public static long dateFun(java.sql.Date v) { return v == null ? -1L : SqlFunctions.toLong(v); } public static long timestampFun(java.sql.Timestamp v) {
public static long timestampFun(java.sql.Timestamp v) { return v == null ? -1L : SqlFunctions.toLong(v); } public static long timeFun(java.sql.Time v) {
public static long toLong(Time time) { return time == null ? 0 : SqlFunctions.toLong(time); }