public class SqlFunctions extends Object
Not present: and, or, not (builtin operators are better, because they use lazy evaluation. Implementations do not check for null values; the calling code must do that.
Many of the functions do not check for null values. This is intentional. If null arguments are possible, the code-generation framework checks for nulls before calling the functions.
| Modifier and Type | Class and Description |
|---|---|
static class |
SqlFunctions.FlatProductInputType
Type of argument passed into
flatProduct(int[], boolean, org.apache.calcite.runtime.SqlFunctions.FlatProductInputType[]). |
private static class |
SqlFunctions.ProductComparableListEnumerator<E extends Comparable>
Enumerates over the cartesian product of the given lists, returning
a comparable list for each row.
|
| Modifier and Type | Field and Description |
|---|---|
private static Function1<Object[],Enumerable<Object[]>> |
ARRAY_CARTESIAN_PRODUCT |
private static DecimalFormat |
DOUBLE_FORMAT |
private static Function1<List<Object>,Enumerable<Object>> |
LIST_AS_ENUMERABLE |
private static TimeZone |
LOCAL_TZ |
private static ThreadLocal<Map<String,AtomicLong>> |
THREAD_SEQUENCES
Holds, for each thread, a map from sequence name to sequence current
value.
|
| Modifier | Constructor and Description |
|---|---|
private |
SqlFunctions() |
| Modifier and Type | Method and Description |
|---|---|
static BigDecimal |
abs(BigDecimal b0)
SQL
ABS operator applied to BigDecimal values. |
static byte |
abs(byte b0)
SQL
ABS operator applied to byte values. |
static double |
abs(double b0)
SQL
ABS operator applied to double values. |
static float |
abs(float b0)
SQL
ABS operator applied to float values. |
static int |
abs(int b0)
SQL
ABS operator applied to int values. |
static long |
abs(long b0)
SQL
ABS operator applied to long values. |
static short |
abs(short b0)
SQL
ABS operator applied to short values. |
static double |
acos(BigDecimal b0)
SQL
ACOS operator applied to BigDecimal values. |
static double |
acos(double b0)
SQL
ACOS operator applied to double values. |
static double |
acos(long b0)
SQL
ACOS operator applied to long values. |
static int |
addMonths(int date,
int m)
Adds a given number of months to a date, represented as the number of
days since the epoch.
|
static long |
addMonths(long timestamp,
int m)
Adds a given number of months to a timestamp, represented as the number
of milliseconds since the epoch.
|
private static boolean |
allAssignable(Class clazz,
Object o0,
Object o1)
Returns whether two objects can both be assigned to a given class.
|
static Object[] |
array(Object... args) |
static Object |
arrayItem(List list,
int item)
Helper for "array element reference".
|
static Object |
arrayItemOptional(List list,
int item)
As
arrayItem(java.util.List, int) method, but allows array to be nullable. |
static List |
arrayToList(Array a)
Converts a JDBC array to a list.
|
static double |
asin(BigDecimal b0)
SQL
ASIN operator applied to BigDecimal values. |
static double |
asin(double b0)
SQL
ASIN operator applied to double values. |
static double |
asin(long b0)
SQL
ASIN operator applied to long values. |
static double |
atan(BigDecimal b0)
SQL
ATAN operator applied to BigDecimal values. |
static double |
atan(double b0)
SQL
ATAN operator applied to double values. |
static double |
atan(long b0)
SQL
ATAN operator applied to long values. |
static double |
atan2(BigDecimal b0,
BigDecimal b1)
SQL
ATAN2 operator applied to BigDecimal values. |
static double |
atan2(double b0,
double b1)
SQL
ATAN2 operator applied to double values. |
static double |
atan2(long b0,
BigDecimal b1)
SQL
ATAN2 operator applied to long/BigDecimal values. |
static double |
atan2(long b0,
long b1)
SQL
ATAN2 operator applied to long values. |
private static Object |
cannotConvert(Object o,
Class toType) |
static BigDecimal |
ceil(BigDecimal b0) |
static BigDecimal |
ceil(BigDecimal b0,
BigDecimal b1) |
static BigDecimal |
ceil(BigDecimal b0,
int b1) |
static byte |
ceil(byte b0,
byte b1)
SQL
CEIL operator applied to byte values. |
static double |
ceil(double b0) |
static float |
ceil(float b0) |
static int |
ceil(int b0,
BigDecimal b1) |
static int |
ceil(int b0,
int b1)
SQL
CEIL operator applied to int values. |
static long |
ceil(long b0,
long b1)
SQL
CEIL operator applied to long values. |
static short |
ceil(short b0,
short b1)
SQL
CEIL operator applied to short values. |
static int |
charLength(String s)
SQL CHARACTER_LENGTH(string) function.
|
static int |
compare(boolean x,
boolean y)
Boolean comparison.
|
static org.apache.calcite.avatica.util.ByteString |
concat(org.apache.calcite.avatica.util.ByteString s0,
org.apache.calcite.avatica.util.ByteString s1)
SQL
binary || binary operator. |
static String |
concat(String s0,
String s1)
SQL
string || string operator. |
static double |
cos(BigDecimal b0)
SQL
COS operator applied to BigDecimal values. |
static double |
cos(double b0)
SQL
COS operator applied to double values. |
static double |
cos(long b0)
SQL
COS operator applied to long values. |
static double |
cot(BigDecimal b0)
SQL
COT operator applied to BigDecimal values. |
static double |
cot(double b0)
SQL
COT operator applied to double values. |
static double |
cot(long b0)
SQL
COT operator applied to long values. |
static int |
currentDate(DataContext root)
SQL
CURRENT_DATE function. |
static int |
currentTime(DataContext root)
SQL
CURRENT_TIME function. |
static long |
currentTimestamp(DataContext root)
SQL
CURRENT_TIMESTAMP function. |
static double |
degrees(BigDecimal b0)
SQL
DEGREES operator applied to BigDecimal values. |
static double |
degrees(double b0)
SQL
DEGREES operator applied to double values. |
static double |
degrees(long b0)
SQL
DEGREES operator applied to long values. |
static BigDecimal |
divide(BigDecimal b0,
BigDecimal b1)
SQL
/ operator applied to BigDecimal values. |
static int |
divide(int b0,
BigDecimal b1) |
static Integer |
divide(Integer b0,
int b1)
SQL
/ operator applied to int values; left side may be
null. |
static Integer |
divide(Integer b0,
Integer b1)
SQL
/ operator applied to nullable int values. |
static Long |
divide(Integer b0,
Long b1)
SQL
/ operator applied to nullable int and long values. |
static int |
divide(int b0,
int b1)
SQL
/ operator applied to int values. |
static Integer |
divide(int b0,
Integer b1)
SQL
/ operator applied to int values; right side may be
null. |
static long |
divide(long b0,
BigDecimal b1) |
static Long |
divide(Long b0,
Integer b1)
SQL
/ operator applied to nullable long and int values. |
static Object |
divideAny(Object b0,
Object b1)
SQL
/ operator applied to Object values (at least one operand
has ANY type; either may be null). |
static Object |
element(List list)
Support the ELEMENT function.
|
static boolean |
eq(BigDecimal b0,
BigDecimal b1)
SQL
= operator applied to BigDecimal values (neither may be
null). |
static boolean |
eq(Object b0,
Object b1)
SQL
= operator applied to Object values (including String;
neither side may be null). |
static boolean |
eqAny(Object b0,
Object b1)
SQL
= operator applied to Object values (at least one operand
has ANY type; neither may be null). |
static double |
exp(BigDecimal b0) |
static double |
exp(double b0)
SQL
EXP operator applied to double values. |
static double |
exp(long b0) |
static Function1<Object,Enumerable<FlatLists.ComparableList<Comparable>>> |
flatProduct(int[] fieldCounts,
boolean withOrdinality,
SqlFunctions.FlatProductInputType[] inputTypes) |
static BigDecimal |
floor(BigDecimal b0) |
static BigDecimal |
floor(BigDecimal b0,
BigDecimal b1) |
static BigDecimal |
floor(BigDecimal b0,
int b1) |
static byte |
floor(byte b0,
byte b1)
SQL
FLOOR operator applied to byte values. |
static double |
floor(double b0) |
static float |
floor(float b0) |
static int |
floor(int b0,
BigDecimal b1) |
static int |
floor(int b0,
int b1)
SQL
FLOOR operator applied to int values. |
static long |
floor(long b0,
long b1)
SQL
FLOOR operator applied to long values. |
static short |
floor(short b0,
short b1)
SQL
FLOOR operator applied to short values. |
static boolean |
ge(BigDecimal b0,
BigDecimal b1)
SQL
≥ operator applied to BigDecimal values. |
static boolean |
ge(boolean b0,
boolean b1)
SQL
≥ operator applied to boolean values. |
static boolean |
ge(org.apache.calcite.avatica.util.ByteString b0,
org.apache.calcite.avatica.util.ByteString b1)
SQL
≥ operator applied to ByteString values. |
static boolean |
ge(String b0,
String b1)
SQL
≥ operator applied to String values. |
static boolean |
geAny(Object b0,
Object b1)
SQL
≥ operator applied to Object values (at least one
operand has ANY type; neither may be null). |
private static AtomicLong |
getAtomicLong(String key) |
static boolean |
greater(boolean b0,
boolean b1) |
static byte |
greater(byte b0,
byte b1) |
static char |
greater(char b0,
char b1) |
static double |
greater(double b0,
double b1) |
static float |
greater(float b0,
float b1) |
static int |
greater(int b0,
int b1) |
static long |
greater(long b0,
long b1) |
static short |
greater(short b0,
short b1) |
static <T extends Comparable<T>> |
greater(T b0,
T b1)
Helper for implementing MAX.
|
static <T extends Comparable<T>> |
greatest(T b0,
T b1)
GREATEST operator.
|
static boolean |
gt(BigDecimal b0,
BigDecimal b1)
SQL
> operator applied to BigDecimal values. |
static boolean |
gt(boolean b0,
boolean b1)
SQL
> operator applied to boolean values. |
static boolean |
gt(org.apache.calcite.avatica.util.ByteString b0,
org.apache.calcite.avatica.util.ByteString b1)
SQL
> operator applied to ByteString values. |
static boolean |
gt(String b0,
String b1)
SQL
> operator applied to String values. |
static boolean |
gtAny(Object b0,
Object b1)
SQL
> operator applied to Object values (at least one
operand has ANY type; neither may be null). |
static String |
initcap(String s)
SQL INITCAP(string) function.
|
static Date |
internalToDate(int v)
Converts the internal representation of a SQL DATE (int) to the Java
type used for UDF parameters (
Date). |
static Date |
internalToDate(Integer v)
As
internalToDate(int) but allows nulls. |
static Time |
internalToTime(int v)
Converts the internal representation of a SQL TIME (int) to the Java
type used for UDF parameters (
Time). |
static Time |
internalToTime(Integer v) |
static Timestamp |
internalToTimestamp(long v)
Converts the internal representation of a SQL TIMESTAMP (long) to the Java
type used for UDF parameters (
Timestamp). |
static Timestamp |
internalToTimestamp(Long v) |
static boolean |
isFalse(Boolean b)
NULL → FALSE, FALSE → TRUE, TRUE → FALSE.
|
static boolean |
isNotFalse(Boolean b)
NULL → TRUE, FALSE → FALSE, TRUE → TRUE.
|
static boolean |
isNotTrue(Boolean b)
NULL → TRUE, FALSE → TRUE, TRUE → FALSE.
|
static boolean |
isTrue(Boolean b)
NULL → FALSE, FALSE → FALSE, TRUE → TRUE.
|
static Object |
item(Object object,
Object index)
Implements the {@code [ ...
|
static Object |
itemOptional(Object object,
Object index)
As
item(java.lang.Object, java.lang.Object) method, but allows object to be nullable. |
private static int |
lastDay(int y,
int m) |
static boolean |
le(BigDecimal b0,
BigDecimal b1)
SQL
≤ operator applied to BigDecimal values. |
static boolean |
le(boolean b0,
boolean b1)
SQL
≤ operator applied to boolean values. |
static boolean |
le(org.apache.calcite.avatica.util.ByteString b0,
org.apache.calcite.avatica.util.ByteString b1)
SQL
≤ operator applied to ByteString values. |
static boolean |
le(String b0,
String b1)
SQL
≤ operator applied to String values. |
static boolean |
leAny(Object b0,
Object b1)
SQL
≤ operator applied to Object values (at least one
operand has ANY type; neither may be null). |
static <T extends Comparable<T>> |
least(T b0,
T b1)
LEAST operator.
|
static boolean |
lesser(boolean b0,
boolean b1) |
static byte |
lesser(byte b0,
byte b1) |
static char |
lesser(char b0,
char b1) |
static double |
lesser(double b0,
double b1) |
static float |
lesser(float b0,
float b1) |
static int |
lesser(int b0,
int b1) |
static long |
lesser(long b0,
long b1) |
static short |
lesser(short b0,
short b1) |
static <T extends Comparable<T>> |
lesser(T b0,
T b1)
Helper for implementing MIN.
|
static boolean |
like(String s,
String pattern)
SQL
LIKE function. |
static boolean |
like(String s,
String pattern,
String escape)
SQL
LIKE function with escape. |
static double |
ln(BigDecimal d)
SQL
LN(number) function applied to BigDecimal values. |
static double |
ln(double d)
SQL
LN(number) function applied to double values. |
static double |
ln(long b0)
SQL
LN(number) function applied to long values. |
static int |
localTime(DataContext root)
SQL
LOCAL_TIME function. |
static long |
localTimestamp(DataContext root)
SQL
LOCAL_TIMESTAMP function. |
static double |
log10(BigDecimal d)
SQL
LOG10(number) function applied to BigDecimal values. |
static double |
log10(double b0)
SQL
LOG10(numeric) operator applied to double values. |
static double |
log10(long b0)
SQL
LOG10(number) function applied to long values. |
static String |
lower(String s)
SQL LOWER(string) function.
|
static boolean |
lt(BigDecimal b0,
BigDecimal b1)
SQL
< operator applied to BigDecimal values. |
static boolean |
lt(boolean b0,
boolean b1)
SQL
< operator applied to boolean values. |
static boolean |
lt(org.apache.calcite.avatica.util.ByteString b0,
org.apache.calcite.avatica.util.ByteString b1)
SQL
< operator applied to ByteString values. |
static boolean |
lt(String b0,
String b1)
SQL
< operator applied to String values. |
static boolean |
ltAny(Object b0,
Object b1)
SQL
< operator applied to Object values. |
static String |
ltrim(String s)
SQL
LTRIM function. |
static Object |
mapItem(Map map,
Object item)
Helper for "map element reference".
|
static Object |
mapItemOptional(Map map,
Object item)
As
mapItem(java.util.Map, java.lang.Object) method, but allows map to be nullable. |
static BigDecimal |
minus(BigDecimal b0,
BigDecimal b1)
SQL
- operator applied to BigDecimal values. |
static Integer |
minus(Integer b0,
int b1)
SQL
- operator applied to int values; left side may be
null. |
static Integer |
minus(Integer b0,
Integer b1)
SQL
- operator applied to nullable int values. |
static Long |
minus(Integer b0,
Long b1)
SQL
- operator applied to nullable int and long values. |
static int |
minus(int b0,
int b1)
SQL
- operator applied to int values. |
static Integer |
minus(int b0,
Integer b1)
SQL
- operator applied to int values; right side may be
null. |
static Long |
minus(Long b0,
Integer b1)
SQL
- operator applied to nullable long and int values. |
static Object |
minusAny(Object b0,
Object b1)
SQL
- operator applied to Object values (at least one operand
has ANY type; either may be null). |
static BigDecimal |
mod(BigDecimal b0,
BigDecimal b1) |
static BigDecimal |
mod(BigDecimal b0,
int b1) |
static byte |
mod(byte b0,
byte b1)
SQL
MOD operator applied to byte values. |
static int |
mod(int b0,
BigDecimal b1) |
static int |
mod(int b0,
int b1)
SQL
MOD operator applied to int values. |
static long |
mod(long b0,
long b1)
SQL
MOD operator applied to long values. |
static short |
mod(short b0,
short b1)
SQL
MOD operator applied to short values. |
static BigDecimal |
multiply(BigDecimal b0,
BigDecimal b1)
SQL
* operator applied to BigDecimal values. |
static Integer |
multiply(Integer b0,
int b1)
SQL
* operator applied to int values; left side may be
null. |
static Integer |
multiply(Integer b0,
Integer b1)
SQL
* operator applied to nullable int values. |
static Long |
multiply(Integer b0,
Long b1)
SQL
* operator applied to nullable int and long values. |
static int |
multiply(int b0,
int b1)
SQL
* operator applied to int values. |
static Integer |
multiply(int b0,
Integer b1)
SQL
* operator applied to int values; right side may be
null. |
static Long |
multiply(Long b0,
Integer b1)
SQL
* operator applied to nullable long and int values. |
static Object |
multiplyAny(Object b0,
Object b1)
SQL
* operator applied to Object values (at least one operand
has ANY type; either may be null). |
static boolean |
ne(BigDecimal b0,
BigDecimal b1)
SQL
<gt; operator applied to BigDecimal values. |
static boolean |
ne(Object b0,
Object b1)
SQL
<gt; operator applied to Object values (including
String; neither side may be null). |
static boolean |
neAny(Object b0,
Object b1)
SQL
<gt; operator applied to Object values (at least one
operand has ANY type, including String; neither may be null). |
static Boolean |
not(Boolean b)
NULL → NULL, FALSE → TRUE, TRUE → FALSE.
|
private static IllegalArgumentException |
notArithmetic(String op,
Object b0,
Object b1) |
private static IllegalArgumentException |
notComparable(String op,
Object b0,
Object b1) |
static org.apache.calcite.avatica.util.ByteString |
overlay(org.apache.calcite.avatica.util.ByteString s,
org.apache.calcite.avatica.util.ByteString r,
int start)
SQL
OVERLAY function applied to binary strings. |
static org.apache.calcite.avatica.util.ByteString |
overlay(org.apache.calcite.avatica.util.ByteString s,
org.apache.calcite.avatica.util.ByteString r,
int start,
int length)
SQL
OVERLAY function applied to binary strings. |
static String |
overlay(String s,
String r,
int start)
SQL
OVERLAY function. |
static String |
overlay(String s,
String r,
int start,
int length)
SQL
OVERLAY function. |
private static Enumerable<FlatLists.ComparableList<Comparable>> |
p2(Object[] lists,
int[] fieldCounts,
boolean withOrdinality,
SqlFunctions.FlatProductInputType[] inputTypes) |
static BigDecimal |
plus(BigDecimal b0,
BigDecimal b1)
SQL
+ operator applied to BigDecimal values. |
static Integer |
plus(Integer b0,
int b1)
SQL
+ operator applied to int values; left side may be
null. |
static Integer |
plus(Integer b0,
Integer b1)
SQL
+ operator applied to nullable int values. |
static Long |
plus(Integer b0,
Long b1)
SQL
+ operator applied to nullable int and long values. |
static int |
plus(int b0,
int b1)
SQL
+ operator applied to int values. |
static Integer |
plus(int b0,
Integer b1)
SQL
+ operator applied to int values; right side may be
null. |
static Long |
plus(Long b0,
Integer b1)
SQL
+ operator applied to nullable long and int values. |
static Object |
plusAny(Object b0,
Object b1)
SQL
+ operator applied to Object values (at least one operand
has ANY type; either may be null). |
static int |
position(org.apache.calcite.avatica.util.ByteString seek,
org.apache.calcite.avatica.util.ByteString s)
SQL
POSITION(seek IN string) function for byte strings. |
static int |
position(org.apache.calcite.avatica.util.ByteString seek,
org.apache.calcite.avatica.util.ByteString s,
int from)
SQL
POSITION(seek IN string FROM integer) function for byte
strings. |
static int |
position(String seek,
String s)
SQL
POSITION(seek IN string) function. |
static int |
position(String seek,
String s,
int from)
SQL
POSITION(seek IN string FROM integer) function. |
static double |
power(BigDecimal b0,
BigDecimal b1) |
static double |
power(double b0,
BigDecimal b1) |
static double |
power(double b0,
double b1)
SQL
POWER operator applied to double values. |
static double |
power(long b0,
BigDecimal b1) |
static double |
power(long b0,
long b1) |
static <E extends Comparable> |
product(List<Enumerator<List<E>>> enumerators,
int fieldCount,
boolean withOrdinality)
Similar to
Linq4j.product(Iterable) but each resulting list
implements FlatLists.ComparableList. |
static double |
radians(BigDecimal b0)
SQL
RADIANS operator applied to BigDecimal values. |
static double |
radians(double b0)
SQL
RADIANS operator applied to double values. |
static double |
radians(long b0)
SQL
RADIANS operator applied to long values. |
static String |
replace(String s,
String search,
String replacement)
SQL
REPLACE(string, search, replacement) function. |
static int |
round(int v,
int x)
Helper for rounding.
|
static long |
round(long v,
long x)
Helper for rounding.
|
static org.apache.calcite.avatica.util.ByteString |
rtrim(org.apache.calcite.avatica.util.ByteString s)
Helper for CAST.
|
static String |
rtrim(String s)
SQL
RTRIM function applied to string. |
static long |
sequenceCurrentValue(String key)
Support the
CURRENT VALUE OF sequence operator. |
static long |
sequenceNextValue(String key)
Support the
NEXT VALUE OF sequence operator. |
static BigDecimal |
sign(BigDecimal b0)
SQL
SIGN operator applied to BigDecimal values. |
static double |
sign(double b0)
SQL
SIGN operator applied to double values. |
static int |
sign(int b0)
SQL
SIGN operator applied to int values. |
static long |
sign(long b0)
SQL
SIGN operator applied to long values. |
static boolean |
similar(String s,
String pattern)
SQL
SIMILAR function. |
static boolean |
similar(String s,
String pattern,
String escape)
SQL
SIMILAR function with escape. |
static double |
sin(BigDecimal b0)
SQL
SIN operator applied to BigDecimal values. |
static double |
sin(double b0)
SQL
SIN operator applied to double values. |
static double |
sin(long b0)
SQL
SIN operator applied to long values. |
static List |
slice(List list)
Support the SLICE function.
|
static BigDecimal |
sround(BigDecimal b0)
SQL
ROUND operator applied to BigDecimal values. |
static BigDecimal |
sround(BigDecimal b0,
int b1)
SQL
ROUND operator applied to BigDecimal values. |
static double |
sround(double b0)
SQL
ROUND operator applied to double values. |
static double |
sround(double b0,
int b1)
SQL
ROUND operator applied to double values. |
static int |
sround(int b0)
SQL
ROUND operator applied to int values. |
static int |
sround(int b0,
int b1)
SQL
ROUND operator applied to int values. |
static long |
sround(long b0)
SQL
ROUND operator applied to long values. |
static long |
sround(long b0,
int b1)
SQL
ROUND operator applied to long values. |
static BigDecimal |
struncate(BigDecimal b0)
SQL
TRUNCATE operator applied to BigDecimal values. |
static BigDecimal |
struncate(BigDecimal b0,
int b1) |
static double |
struncate(double b0)
SQL
TRUNCATE operator applied to double values. |
static double |
struncate(double b0,
int b1) |
static int |
struncate(int b0)
SQL
TRUNCATE operator applied to int values. |
static int |
struncate(int b0,
int b1) |
static long |
struncate(long b0)
SQL
TRUNCATE operator applied to long values. |
static long |
struncate(long b0,
int b1) |
static org.apache.calcite.avatica.util.ByteString |
substring(org.apache.calcite.avatica.util.ByteString b,
int from)
SQL SUBSTRING(binary FROM ...) function.
|
static org.apache.calcite.avatica.util.ByteString |
substring(org.apache.calcite.avatica.util.ByteString b,
int from,
int for_)
SQL SUBSTRING(binary FROM ...
|
static String |
substring(String s,
int from)
SQL SUBSTRING(string FROM ...) function.
|
static String |
substring(String s,
int from,
int for_)
SQL SUBSTRING(string FROM ...
|
static int |
subtractMonths(int date0,
int date1)
Finds the number of months between two dates, each represented as the
number of days since the epoch.
|
static int |
subtractMonths(long t0,
long t1) |
static double |
tan(BigDecimal b0)
SQL
TAN operator applied to BigDecimal values. |
static double |
tan(double b0)
SQL
TAN operator applied to double values. |
static double |
tan(long b0)
SQL
TAN operator applied to long values. |
static int |
timestampWithLocalTimeZoneToDate(long v,
TimeZone timeZone) |
static String |
timestampWithLocalTimeZoneToString(long v,
TimeZone timeZone) |
static int |
timestampWithLocalTimeZoneToTime(long v,
TimeZone timeZone) |
static long |
timestampWithLocalTimeZoneToTimestamp(long v,
TimeZone timeZone) |
static int |
timestampWithLocalTimeZoneToTimeWithLocalTimeZone(long v) |
static String |
timeWithLocalTimeZoneToString(int v,
TimeZone timeZone) |
static int |
timeWithLocalTimeZoneToTime(int v,
TimeZone timeZone) |
static long |
timeWithLocalTimeZoneToTimestamp(String date,
int v,
TimeZone timeZone) |
static long |
timeWithLocalTimeZoneToTimestampWithLocalTimeZone(String date,
int v) |
static TimeZone |
timeZone(DataContext root) |
static BigDecimal |
toBigDecimal(Number number) |
static BigDecimal |
toBigDecimal(Object o) |
static BigDecimal |
toBigDecimal(String s) |
static boolean |
toBoolean(Number number) |
static boolean |
toBoolean(Object o) |
static boolean |
toBoolean(String s)
CAST(VARCHAR AS BOOLEAN).
|
static byte |
toByte(Number number) |
static byte |
toByte(Object o) |
static char |
toChar(String s) |
static Character |
toCharBoxed(String s) |
static double |
toDouble(Number number) |
static double |
toDouble(Object o) |
static double |
toDouble(String s) |
static float |
toFloat(Number number) |
static float |
toFloat(Object o) |
static float |
toFloat(String s) |
static int |
toInt(Date v)
Converts the Java type used for UDF parameters of SQL DATE type
(
Date) to internal representation (int). |
static int |
toInt(Date v,
TimeZone timeZone) |
static int |
toInt(Number number) |
static int |
toInt(Object o) |
static int |
toInt(String s) |
static int |
toInt(Time v)
Converts the Java type used for UDF parameters of SQL TIME type
(
Time) to internal representation (int). |
static Integer |
toIntOptional(Date v) |
static Integer |
toIntOptional(Date v,
TimeZone timeZone) |
static Integer |
toIntOptional(Time v) |
static long |
toLong(Date v) |
static long |
toLong(Date v,
TimeZone timeZone) |
static long |
toLong(Number number) |
static long |
toLong(Object o) |
static long |
toLong(String s) |
static long |
toLong(Timestamp v)
Converts the Java type used for UDF parameters of SQL TIMESTAMP type
(
Timestamp) to internal representation (long). |
static Long |
toLongOptional(Date v) |
static Long |
toLongOptional(Timestamp v,
TimeZone timeZone) |
static short |
toShort(Number number) |
static short |
toShort(Object o) |
static short |
toShort(String s) |
static String |
toString(BigDecimal x)
CAST(DECIMAL AS VARCHAR).
|
static String |
toString(boolean x)
CAST(BOOLEAN AS VARCHAR).
|
static String |
toString(double x)
CAST(DOUBLE AS VARCHAR).
|
static String |
toString(float x)
CAST(FLOAT AS VARCHAR).
|
static Long |
toTimestampWithLocalTimeZone(String v) |
static Long |
toTimestampWithLocalTimeZone(String v,
TimeZone timeZone) |
static Integer |
toTimeWithLocalTimeZone(String v) |
static Integer |
toTimeWithLocalTimeZone(String v,
TimeZone timeZone) |
static String |
translate3(String s,
String search,
String replacement)
SQL
TRANSLATE(string, search_chars, replacement_chars)
function. |
private static org.apache.calcite.avatica.util.ByteString |
trim_(org.apache.calcite.avatica.util.ByteString s,
boolean left,
boolean right)
SQL
TRIM function applied to binary string. |
private static String |
trim_(String s,
boolean left,
boolean right,
char c)
SQL
TRIM function. |
static String |
trim(boolean leading,
boolean trailing,
String seek,
String s)
SQL {@code TRIM(...
|
static org.apache.calcite.avatica.util.ByteString |
trim(org.apache.calcite.avatica.util.ByteString s)
SQL
TRIM function applied to binary string. |
static org.apache.calcite.avatica.util.ByteString |
truncate(org.apache.calcite.avatica.util.ByteString s,
int maxLength)
Helper for CAST(...
|
static int |
truncate(int v,
int x)
Helper for rounding.
|
static long |
truncate(long v,
long x)
Helper for rounding.
|
static String |
truncate(String s,
int maxLength)
Helper for CAST(...
|
static org.apache.calcite.avatica.util.ByteString |
truncateOrPad(org.apache.calcite.avatica.util.ByteString s,
int maxLength)
Helper for CAST(...
|
static String |
truncateOrPad(String s,
int maxLength)
Helper for CAST(...
|
static String |
upper(String s)
SQL UPPER(string) function.
|
private static final DecimalFormat DOUBLE_FORMAT
private static final TimeZone LOCAL_TZ
private static final Function1<List<Object>,Enumerable<Object>> LIST_AS_ENUMERABLE
private static final Function1<Object[],Enumerable<Object[]>> ARRAY_CARTESIAN_PRODUCT
private static final ThreadLocal<Map<String,AtomicLong>> THREAD_SEQUENCES
This is a straw man of an implementation whose main goal is to prove that sequences can be parsed, validated and planned. A real application will want persistent values for sequences, shared among threads.
public static String substring(String s, int from, int for_)
public static String substring(String s, int from)
public static org.apache.calcite.avatica.util.ByteString substring(org.apache.calcite.avatica.util.ByteString b,
int from,
int for_)
public static org.apache.calcite.avatica.util.ByteString substring(org.apache.calcite.avatica.util.ByteString b,
int from)
public static int charLength(String s)
public static org.apache.calcite.avatica.util.ByteString concat(org.apache.calcite.avatica.util.ByteString s0,
org.apache.calcite.avatica.util.ByteString s1)
binary || binary operator.public static String trim(boolean leading, boolean trailing, String seek, String s)
TRIM(... seek FROM s) function.public static org.apache.calcite.avatica.util.ByteString trim(org.apache.calcite.avatica.util.ByteString s)
TRIM function applied to binary string.public static org.apache.calcite.avatica.util.ByteString rtrim(org.apache.calcite.avatica.util.ByteString s)
private static org.apache.calcite.avatica.util.ByteString trim_(org.apache.calcite.avatica.util.ByteString s,
boolean left,
boolean right)
TRIM function applied to binary string.public static String overlay(String s, String r, int start, int length)
OVERLAY function.public static org.apache.calcite.avatica.util.ByteString overlay(org.apache.calcite.avatica.util.ByteString s,
org.apache.calcite.avatica.util.ByteString r,
int start)
OVERLAY function applied to binary strings.public static org.apache.calcite.avatica.util.ByteString overlay(org.apache.calcite.avatica.util.ByteString s,
org.apache.calcite.avatica.util.ByteString r,
int start,
int length)
OVERLAY function applied to binary strings.public static boolean like(String s, String pattern, String escape)
LIKE function with escape.public static boolean similar(String s, String pattern, String escape)
SIMILAR function with escape.public static boolean eq(BigDecimal b0, BigDecimal b1)
= operator applied to BigDecimal values (neither may be
null).public static boolean eq(Object b0, Object b1)
= operator applied to Object values (including String;
neither side may be null).public static boolean eqAny(Object b0, Object b1)
= operator applied to Object values (at least one operand
has ANY type; neither may be null).private static boolean allAssignable(Class clazz, Object o0, Object o1)
public static boolean ne(BigDecimal b0, BigDecimal b1)
<gt; operator applied to BigDecimal values.public static boolean ne(Object b0, Object b1)
<gt; operator applied to Object values (including
String; neither side may be null).public static boolean neAny(Object b0, Object b1)
<gt; operator applied to Object values (at least one
operand has ANY type, including String; neither may be null).public static boolean lt(boolean b0,
boolean b1)
< operator applied to boolean values.public static boolean lt(org.apache.calcite.avatica.util.ByteString b0,
org.apache.calcite.avatica.util.ByteString b1)
< operator applied to ByteString values.public static boolean lt(BigDecimal b0, BigDecimal b1)
< operator applied to BigDecimal values.public static boolean le(boolean b0,
boolean b1)
≤ operator applied to boolean values.public static boolean le(org.apache.calcite.avatica.util.ByteString b0,
org.apache.calcite.avatica.util.ByteString b1)
≤ operator applied to ByteString values.public static boolean le(BigDecimal b0, BigDecimal b1)
≤ operator applied to BigDecimal values.public static boolean leAny(Object b0, Object b1)
≤ operator applied to Object values (at least one
operand has ANY type; neither may be null).public static boolean gt(boolean b0,
boolean b1)
> operator applied to boolean values.public static boolean gt(org.apache.calcite.avatica.util.ByteString b0,
org.apache.calcite.avatica.util.ByteString b1)
> operator applied to ByteString values.public static boolean gt(BigDecimal b0, BigDecimal b1)
> operator applied to BigDecimal values.public static boolean gtAny(Object b0, Object b1)
> operator applied to Object values (at least one
operand has ANY type; neither may be null).public static boolean ge(boolean b0,
boolean b1)
≥ operator applied to boolean values.public static boolean ge(org.apache.calcite.avatica.util.ByteString b0,
org.apache.calcite.avatica.util.ByteString b1)
≥ operator applied to ByteString values.public static boolean ge(BigDecimal b0, BigDecimal b1)
≥ operator applied to BigDecimal values.public static boolean geAny(Object b0, Object b1)
≥ operator applied to Object values (at least one
operand has ANY type; neither may be null).public static int plus(int b0,
int b1)
+ operator applied to int values.public static Integer plus(Integer b0, int b1)
+ operator applied to int values; left side may be
null.public static Integer plus(int b0, Integer b1)
+ operator applied to int values; right side may be
null.public static Integer plus(Integer b0, Integer b1)
+ operator applied to nullable int values.public static Long plus(Long b0, Integer b1)
+ operator applied to nullable long and int values.public static Long plus(Integer b0, Long b1)
+ operator applied to nullable int and long values.public static BigDecimal plus(BigDecimal b0, BigDecimal b1)
+ operator applied to BigDecimal values.public static Object plusAny(Object b0, Object b1)
+ operator applied to Object values (at least one operand
has ANY type; either may be null).public static int minus(int b0,
int b1)
- operator applied to int values.public static Integer minus(Integer b0, int b1)
- operator applied to int values; left side may be
null.public static Integer minus(int b0, Integer b1)
- operator applied to int values; right side may be
null.public static Integer minus(Integer b0, Integer b1)
- operator applied to nullable int values.public static Long minus(Long b0, Integer b1)
- operator applied to nullable long and int values.public static Long minus(Integer b0, Long b1)
- operator applied to nullable int and long values.public static BigDecimal minus(BigDecimal b0, BigDecimal b1)
- operator applied to BigDecimal values.public static Object minusAny(Object b0, Object b1)
- operator applied to Object values (at least one operand
has ANY type; either may be null).public static int divide(int b0,
int b1)
/ operator applied to int values.public static Integer divide(Integer b0, int b1)
/ operator applied to int values; left side may be
null.public static Integer divide(int b0, Integer b1)
/ operator applied to int values; right side may be
null.public static Integer divide(Integer b0, Integer b1)
/ operator applied to nullable int values.public static Long divide(Long b0, Integer b1)
/ operator applied to nullable long and int values.public static Long divide(Integer b0, Long b1)
/ operator applied to nullable int and long values.public static BigDecimal divide(BigDecimal b0, BigDecimal b1)
/ operator applied to BigDecimal values.public static Object divideAny(Object b0, Object b1)
/ operator applied to Object values (at least one operand
has ANY type; either may be null).public static int divide(int b0,
BigDecimal b1)
public static long divide(long b0,
BigDecimal b1)
public static int multiply(int b0,
int b1)
* operator applied to int values.public static Integer multiply(Integer b0, int b1)
* operator applied to int values; left side may be
null.public static Integer multiply(int b0, Integer b1)
* operator applied to int values; right side may be
null.public static Integer multiply(Integer b0, Integer b1)
* operator applied to nullable int values.public static Long multiply(Long b0, Integer b1)
* operator applied to nullable long and int values.public static Long multiply(Integer b0, Long b1)
* operator applied to nullable int and long values.public static BigDecimal multiply(BigDecimal b0, BigDecimal b1)
* operator applied to BigDecimal values.public static Object multiplyAny(Object b0, Object b1)
* operator applied to Object values (at least one operand
has ANY type; either may be null).private static IllegalArgumentException notArithmetic(String op, Object b0, Object b1)
private static IllegalArgumentException notComparable(String op, Object b0, Object b1)
public static double exp(double b0)
EXP operator applied to double values.public static double exp(BigDecimal b0)
public static double exp(long b0)
public static double power(double b0,
double b1)
POWER operator applied to double values.public static double power(double b0,
BigDecimal b1)
public static double power(long b0,
long b1)
public static double power(BigDecimal b0, BigDecimal b1)
public static double power(long b0,
BigDecimal b1)
public static double ln(double d)
LN(number) function applied to double values.public static double ln(long b0)
LN(number) function applied to long values.public static double ln(BigDecimal d)
LN(number) function applied to BigDecimal values.public static double log10(double b0)
LOG10(numeric) operator applied to double values.public static double log10(long b0)
LOG10(number) function applied to long values.public static double log10(BigDecimal d)
LOG10(number) function applied to BigDecimal values.public static byte mod(byte b0,
byte b1)
MOD operator applied to byte values.public static short mod(short b0,
short b1)
MOD operator applied to short values.public static int mod(int b0,
int b1)
MOD operator applied to int values.public static long mod(long b0,
long b1)
MOD operator applied to long values.public static BigDecimal mod(BigDecimal b0, int b1)
public static int mod(int b0,
BigDecimal b1)
public static BigDecimal mod(BigDecimal b0, BigDecimal b1)
public static double floor(double b0)
public static float floor(float b0)
public static BigDecimal floor(BigDecimal b0)
public static byte floor(byte b0,
byte b1)
FLOOR operator applied to byte values.public static short floor(short b0,
short b1)
FLOOR operator applied to short values.public static int floor(int b0,
int b1)
FLOOR operator applied to int values.public static long floor(long b0,
long b1)
FLOOR operator applied to long values.public static BigDecimal floor(BigDecimal b0, int b1)
public static int floor(int b0,
BigDecimal b1)
public static BigDecimal floor(BigDecimal b0, BigDecimal b1)
public static double ceil(double b0)
public static float ceil(float b0)
public static BigDecimal ceil(BigDecimal b0)
public static byte ceil(byte b0,
byte b1)
CEIL operator applied to byte values.public static short ceil(short b0,
short b1)
CEIL operator applied to short values.public static int ceil(int b0,
int b1)
CEIL operator applied to int values.public static long ceil(long b0,
long b1)
CEIL operator applied to long values.public static BigDecimal ceil(BigDecimal b0, int b1)
public static int ceil(int b0,
BigDecimal b1)
public static BigDecimal ceil(BigDecimal b0, BigDecimal b1)
public static byte abs(byte b0)
ABS operator applied to byte values.public static short abs(short b0)
ABS operator applied to short values.public static int abs(int b0)
ABS operator applied to int values.public static long abs(long b0)
ABS operator applied to long values.public static float abs(float b0)
ABS operator applied to float values.public static double abs(double b0)
ABS operator applied to double values.public static BigDecimal abs(BigDecimal b0)
ABS operator applied to BigDecimal values.public static double acos(long b0)
ACOS operator applied to long values.public static double acos(BigDecimal b0)
ACOS operator applied to BigDecimal values.public static double acos(double b0)
ACOS operator applied to double values.public static double asin(long b0)
ASIN operator applied to long values.public static double asin(BigDecimal b0)
ASIN operator applied to BigDecimal values.public static double asin(double b0)
ASIN operator applied to double values.public static double atan(long b0)
ATAN operator applied to long values.public static double atan(BigDecimal b0)
ATAN operator applied to BigDecimal values.public static double atan(double b0)
ATAN operator applied to double values.public static double atan2(long b0,
long b1)
ATAN2 operator applied to long values.public static double atan2(long b0,
BigDecimal b1)
ATAN2 operator applied to long/BigDecimal values.public static double atan2(BigDecimal b0, BigDecimal b1)
ATAN2 operator applied to BigDecimal values.public static double atan2(double b0,
double b1)
ATAN2 operator applied to double values.public static double cos(long b0)
COS operator applied to long values.public static double cos(BigDecimal b0)
COS operator applied to BigDecimal values.public static double cos(double b0)
COS operator applied to double values.public static double cot(long b0)
COT operator applied to long values.public static double cot(BigDecimal b0)
COT operator applied to BigDecimal values.public static double cot(double b0)
COT operator applied to double values.public static double degrees(long b0)
DEGREES operator applied to long values.public static double degrees(BigDecimal b0)
DEGREES operator applied to BigDecimal values.public static double degrees(double b0)
DEGREES operator applied to double values.public static double radians(long b0)
RADIANS operator applied to long values.public static double radians(BigDecimal b0)
RADIANS operator applied to BigDecimal values.public static double radians(double b0)
RADIANS operator applied to double values.public static int sround(int b0)
ROUND operator applied to int values.public static int sround(int b0,
int b1)
ROUND operator applied to int values.public static long sround(long b0)
ROUND operator applied to long values.public static long sround(long b0,
int b1)
ROUND operator applied to long values.public static BigDecimal sround(BigDecimal b0)
ROUND operator applied to BigDecimal values.public static BigDecimal sround(BigDecimal b0, int b1)
ROUND operator applied to BigDecimal values.public static double sround(double b0)
ROUND operator applied to double values.public static double sround(double b0,
int b1)
ROUND operator applied to double values.public static int struncate(int b0)
TRUNCATE operator applied to int values.public static int struncate(int b0,
int b1)
public static long struncate(long b0)
TRUNCATE operator applied to long values.public static long struncate(long b0,
int b1)
public static BigDecimal struncate(BigDecimal b0)
TRUNCATE operator applied to BigDecimal values.public static BigDecimal struncate(BigDecimal b0, int b1)
public static double struncate(double b0)
TRUNCATE operator applied to double values.public static double struncate(double b0,
int b1)
public static int sign(int b0)
SIGN operator applied to int values.public static long sign(long b0)
SIGN operator applied to long values.public static BigDecimal sign(BigDecimal b0)
SIGN operator applied to BigDecimal values.public static double sign(double b0)
SIGN operator applied to double values.public static double sin(long b0)
SIN operator applied to long values.public static double sin(BigDecimal b0)
SIN operator applied to BigDecimal values.public static double sin(double b0)
SIN operator applied to double values.public static double tan(long b0)
TAN operator applied to long values.public static double tan(BigDecimal b0)
TAN operator applied to BigDecimal values.public static double tan(double b0)
TAN operator applied to double values.public static <T extends Comparable<T>> T lesser(T b0, T b1)
public static <T extends Comparable<T>> T least(T b0, T b1)
public static boolean greater(boolean b0,
boolean b1)
public static boolean lesser(boolean b0,
boolean b1)
public static byte greater(byte b0,
byte b1)
public static byte lesser(byte b0,
byte b1)
public static char greater(char b0,
char b1)
public static char lesser(char b0,
char b1)
public static short greater(short b0,
short b1)
public static short lesser(short b0,
short b1)
public static int greater(int b0,
int b1)
public static int lesser(int b0,
int b1)
public static long greater(long b0,
long b1)
public static long lesser(long b0,
long b1)
public static float greater(float b0,
float b1)
public static float lesser(float b0,
float b1)
public static double greater(double b0,
double b1)
public static double lesser(double b0,
double b1)
public static <T extends Comparable<T>> T greater(T b0, T b1)
public static <T extends Comparable<T>> T greatest(T b0, T b1)
public static int compare(boolean x,
boolean y)
public static String toString(float x)
public static String toString(double x)
public static String toString(BigDecimal x)
public static String toString(boolean x)
public static boolean toBoolean(String s)
public static boolean toBoolean(Number number)
public static boolean toBoolean(Object o)
public static byte toByte(Object o)
public static byte toByte(Number number)
public static char toChar(String s)
public static short toShort(String s)
public static short toShort(Number number)
public static short toShort(Object o)
public static int toInt(Date v)
Date) to internal representation (int).
Converse of internalToDate(int).
public static long toLong(Date v)
public static int toInt(Time v)
Time) to internal representation (int).
Converse of internalToTime(int).
public static int toInt(String s)
public static int toInt(Number number)
public static int toInt(Object o)
public static long toLong(Timestamp v)
Timestamp) to internal representation (long).
Converse of internalToTimestamp(long).
public static long toLong(String s)
public static long toLong(Number number)
public static long toLong(Object o)
public static float toFloat(String s)
public static float toFloat(Number number)
public static float toFloat(Object o)
public static double toDouble(String s)
public static double toDouble(Number number)
public static double toDouble(Object o)
public static BigDecimal toBigDecimal(String s)
public static BigDecimal toBigDecimal(Number number)
public static BigDecimal toBigDecimal(Object o)
public static Date internalToDate(int v)
Date).public static Date internalToDate(Integer v)
internalToDate(int) but allows nulls.public static Time internalToTime(int v)
Time).public static int timeWithLocalTimeZoneToTime(int v,
TimeZone timeZone)
public static long timeWithLocalTimeZoneToTimestamp(String date, int v, TimeZone timeZone)
public static long timeWithLocalTimeZoneToTimestampWithLocalTimeZone(String date, int v)
public static String timeWithLocalTimeZoneToString(int v, TimeZone timeZone)
public static Timestamp internalToTimestamp(long v)
Timestamp).public static int timestampWithLocalTimeZoneToDate(long v,
TimeZone timeZone)
public static int timestampWithLocalTimeZoneToTime(long v,
TimeZone timeZone)
public static long timestampWithLocalTimeZoneToTimestamp(long v,
TimeZone timeZone)
public static String timestampWithLocalTimeZoneToString(long v, TimeZone timeZone)
public static int timestampWithLocalTimeZoneToTimeWithLocalTimeZone(long v)
public static Long toTimestampWithLocalTimeZone(String v, TimeZone timeZone)
public static String truncate(String s, int maxLength)
public static String truncateOrPad(String s, int maxLength)
public static org.apache.calcite.avatica.util.ByteString truncate(org.apache.calcite.avatica.util.ByteString s,
int maxLength)
public static org.apache.calcite.avatica.util.ByteString truncateOrPad(org.apache.calcite.avatica.util.ByteString s,
int maxLength)
public static int position(org.apache.calcite.avatica.util.ByteString seek,
org.apache.calcite.avatica.util.ByteString s)
POSITION(seek IN string) function for byte strings.public static int position(String seek, String s, int from)
POSITION(seek IN string FROM integer) function.public static int position(org.apache.calcite.avatica.util.ByteString seek,
org.apache.calcite.avatica.util.ByteString s,
int from)
POSITION(seek IN string FROM integer) function for byte
strings.public static long round(long v,
long x)
public static long truncate(long v,
long x)
public static int round(int v,
int x)
public static int truncate(int v,
int x)
public static long currentTimestamp(DataContext root)
CURRENT_TIMESTAMP function.public static int currentTime(DataContext root)
CURRENT_TIME function.public static int currentDate(DataContext root)
CURRENT_DATE function.public static long localTimestamp(DataContext root)
LOCAL_TIMESTAMP function.public static int localTime(DataContext root)
LOCAL_TIME function.public static TimeZone timeZone(DataContext root)
public static String translate3(String s, String search, String replacement)
TRANSLATE(string, search_chars, replacement_chars)
function.public static String replace(String s, String search, String replacement)
REPLACE(string, search, replacement) function.public static Object arrayItem(List list, int item)
public static Object mapItem(Map map, Object item)
public static Object item(Object object, Object index)
[ ... ] operator on an object whose type is not
known until runtime.public static Object arrayItemOptional(List list, int item)
arrayItem(java.util.List, int) method, but allows array to be nullable.public static Object mapItemOptional(Map map, Object item)
mapItem(java.util.Map, java.lang.Object) method, but allows map to be nullable.public static Object itemOptional(Object object, Object index)
item(java.lang.Object, java.lang.Object) method, but allows object to be nullable.public static boolean isTrue(Boolean b)
public static boolean isFalse(Boolean b)
public static boolean isNotTrue(Boolean b)
public static boolean isNotFalse(Boolean b)
public static long sequenceCurrentValue(String key)
CURRENT VALUE OF sequence operator.public static long sequenceNextValue(String key)
NEXT VALUE OF sequence operator.private static AtomicLong getAtomicLong(String key)
public static Function1<Object,Enumerable<FlatLists.ComparableList<Comparable>>> flatProduct(int[] fieldCounts, boolean withOrdinality, SqlFunctions.FlatProductInputType[] inputTypes)
private static Enumerable<FlatLists.ComparableList<Comparable>> p2(Object[] lists, int[] fieldCounts, boolean withOrdinality, SqlFunctions.FlatProductInputType[] inputTypes)
public static <E extends Comparable> Enumerable<FlatLists.ComparableList<E>> product(List<Enumerator<List<E>>> enumerators, int fieldCount, boolean withOrdinality)
Linq4j.product(Iterable) but each resulting list
implements FlatLists.ComparableList.public static long addMonths(long timestamp,
int m)
public static int addMonths(int date,
int m)
private static int lastDay(int y,
int m)
public static int subtractMonths(int date0,
int date1)
public static int subtractMonths(long t0,
long t1)
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.