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[]). |
| 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 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.
|
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 int |
ascii(String s)
SQL ASCII(string) function.
|
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 |
atan(BigDecimal b0)
SQL
ATAN operator applied to BigDecimal values. |
static double |
atan(double b0)
SQL
ATAN operator applied to double values. |
static double |
atan2(BigDecimal b0,
BigDecimal b1)
SQL
ATAN2 operator applied to BigDecimal values. |
static double |
atan2(BigDecimal b0,
double b1)
SQL
ATAN2 operator applied to BigDecimal/double values. |
static double |
atan2(double b0,
BigDecimal b1)
SQL
ATAN2 operator applied to double/BigDecimal values. |
static double |
atan2(double b0,
double b1)
SQL
ATAN2 operator applied to double values. |
static org.apache.calcite.avatica.util.ByteString |
bitAnd(org.apache.calcite.avatica.util.ByteString b0,
org.apache.calcite.avatica.util.ByteString b1)
Bitwise function
BIT_AND applied to binary values. |
static long |
bitAnd(long b0,
long b1)
Bitwise function
BIT_AND applied to integer values. |
static org.apache.calcite.avatica.util.ByteString |
bitOr(org.apache.calcite.avatica.util.ByteString b0,
org.apache.calcite.avatica.util.ByteString b1)
Bitwise function
BIT_OR applied to binary values. |
static long |
bitOr(long b0,
long b1)
Bitwise function
BIT_OR applied to integer values. |
static org.apache.calcite.avatica.util.ByteString |
bitXor(org.apache.calcite.avatica.util.ByteString b0,
org.apache.calcite.avatica.util.ByteString b1)
Bitwise function
BIT_XOR applied to binary values. |
static long |
bitXor(long b0,
long b1)
Bitwise function
BIT_XOR applied to integer values. |
static double |
cbrt(BigDecimal b)
SQL
CBRT operator applied to BigDecimal values. |
static double |
cbrt(double b)
SQL
CBRT operator applied to double values. |
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 String |
chr(long n)
SQL CHR(long) 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... args)
SQL
concat(arg0, arg1, arg2, ...) function. |
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 |
cosh(BigDecimal b)
SQL
COSH operator applied to BigDecimal values. |
static double |
cosh(double b)
SQL
COSH operator applied to double 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 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 int |
dateFromUnixDate(int v)
|
static String |
dayNameWithDate(int date,
Locale locale)
SQL
DAYNAME function, applied to a DATE argument. |
static String |
dayNameWithTimestamp(long timestamp,
Locale locale)
SQL
DAYNAME function, applied to a TIMESTAMP argument. |
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 int |
difference(String s0,
String s1)
SQL DIFFERENCE(string, string) function.
|
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 (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 |
eq(String s0,
String s1,
Comparator<String> comparator)
SQL
= operator applied to String values with a certain Comparator. |
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 org.apache.calcite.linq4j.function.Function1<Object,org.apache.calcite.linq4j.Enumerable<Comparable>> |
flatList()
Function that, given a certain List containing single-item structs (i.e. arrays / lists with
a single item), builds an Enumerable that returns those single items inside the structs.
|
static org.apache.calcite.linq4j.function.Function1<Object,org.apache.calcite.linq4j.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 org.apache.calcite.avatica.util.ByteString |
fromBase64(String base64)
SQL FROM_BASE64(string) function.
|
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 |
ge(String b0,
String b1,
Comparator<String> comparator)
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). |
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 |
gt(String b0,
String b1,
Comparator<String> comparator)
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 |
isASet(Collection collection)
Support the IS A SET function.
|
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
[ ... ] operator on an object whose type is not
known until runtime. |
static Object |
itemOptional(Object object,
Object index)
As
item(java.lang.Object, java.lang.Object) method, but allows object to be nullable. |
static int |
lastDay(int date)
SQL
LAST_DAY function. |
static int |
lastDay(long timestamp)
SQL
LAST_DAY function. |
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 |
le(String b0,
String b1,
Comparator<String> comparator)
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 org.apache.calcite.avatica.util.ByteString |
left(org.apache.calcite.avatica.util.ByteString s,
int n)
SQL LEFT(ByteString, integer) function.
|
static String |
left(String s,
int n)
SQL LEFT(string, integer) function.
|
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 Locale |
locale(DataContext root) |
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 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 |
lt(String b0,
String b1,
Comparator<String> comparator)
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 String |
md5(org.apache.calcite.avatica.util.ByteString string)
SQL MD5(string) function for binary string.
|
static String |
md5(String string)
SQL MD5(string) function.
|
static boolean |
memberOf(Object object,
Collection collection)
Support the MEMBER OF function.
|
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 BigDecimal |
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 String |
monthNameWithDate(int date,
Locale locale)
SQL
MONTHNAME function, applied to a DATE argument. |
static String |
monthNameWithTimestamp(long timestamp,
Locale locale)
SQL
MONTHNAME function, applied to a TIMESTAMP argument. |
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 <E> Collection<E> |
multisetExceptAll(Collection<E> c1,
Collection<E> c2)
Support the MULTISET EXCEPT ALL function.
|
static <E> Collection<E> |
multisetExceptDistinct(Collection<E> c1,
Collection<E> c2)
Support the MULTISET EXCEPT DISTINCT function.
|
static <E> Collection<E> |
multisetIntersectAll(Collection<E> c1,
Collection<E> c2)
Support the MULTISET INTERSECT ALL function.
|
static <E> Collection<E> |
multisetIntersectDistinct(Collection<E> c1,
Collection<E> c2)
Support the MULTISET INTERSECT DISTINCT function.
|
static Collection |
multisetUnionAll(Collection collection1,
Collection collection2)
Support the MULTISET UNION ALL function.
|
static Collection |
multisetUnionDistinct(Collection collection1,
Collection collection2)
Support the MULTISET UNION function.
|
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 |
ne(String s0,
String s1,
Comparator<String> comparator)
SQL
<gt; operator applied to OString values with a certain Comparator. |
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.
|
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. |
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 boolean |
posixRegex(String s,
String regex,
Boolean caseSensitive) |
static double |
power(BigDecimal b0,
BigDecimal b1) |
static double |
power(BigDecimal b0,
double b1) |
static double |
power(double b0,
BigDecimal b1) |
static double |
power(double b0,
double b1)
SQL
POWER operator applied to double values. |
static <E extends Comparable> |
product(List<org.apache.calcite.linq4j.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 String |
regexpReplace(String s,
String regex,
String replacement)
SQL
REGEXP_REPLACE function with 3 arguments. |
static String |
regexpReplace(String s,
String regex,
String replacement,
int pos)
SQL
REGEXP_REPLACE function with 4 arguments. |
static String |
regexpReplace(String s,
String regex,
String replacement,
int pos,
int occurrence)
SQL
REGEXP_REPLACE function with 5 arguments. |
static String |
regexpReplace(String s,
String regex,
String replacement,
int pos,
int occurrence,
String matchType)
SQL
REGEXP_REPLACE function with 6 arguments. |
static String |
repeat(String s,
int n)
SQL REPEAT(string, int) function.
|
static String |
replace(String s,
String search,
String replacement)
SQL
REPLACE(string, search, replacement) function. |
static String |
reverse(String s)
SQL REVERSE(string) function.
|
static org.apache.calcite.avatica.util.ByteString |
right(org.apache.calcite.avatica.util.ByteString s,
int n)
SQL RIGHT(ByteString, integer) function.
|
static String |
right(String s,
int n)
SQL RIGHT(string, integer) 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 String |
sha1(org.apache.calcite.avatica.util.ByteString string)
SQL SHA1(string) function for binary string.
|
static String |
sha1(String string)
SQL SHA1(string) function.
|
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 |
sinh(BigDecimal b)
SQL
SINH operator applied to BigDecimal values. |
static double |
sinh(double b)
SQL
SINH operator applied to double values. |
static List |
slice(List list)
Support the SLICE function.
|
static String |
soundex(String s)
SQL SOUNDEX(string) function.
|
static String |
space(int n)
SQL SPACE(int) 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 int |
strcmp(String s0,
String s1)
SQL STRCMP(String,String) function.
|
static Object |
structAccess(Object structObject,
int index,
String fieldName)
Implements the
. |
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 boolean |
submultisetOf(Collection possibleSubMultiset,
Collection multiset)
Support the SUBMULTISET OF function.
|
static org.apache.calcite.avatica.util.ByteString |
substring(org.apache.calcite.avatica.util.ByteString c,
int s)
SQL SUBSTRING(binary FROM ...) function.
|
static org.apache.calcite.avatica.util.ByteString |
substring(org.apache.calcite.avatica.util.ByteString c,
int s,
int l)
SQL SUBSTRING(binary FROM ...
|
static String |
substring(String c,
int s)
SQL SUBSTRING(string FROM ...) function.
|
static String |
substring(String c,
int s,
int l)
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 String |
systemUser(DataContext root)
SQL
SYSTEM_USER function. |
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 |
tanh(BigDecimal b)
SQL
TANH operator applied to BigDecimal values. |
static double |
tanh(double b)
SQL
TANH operator applied to double values. |
static long |
timestampMicros(long v)
|
static long |
timestampMillis(long v)
|
static long |
timestampSeconds(long v)
|
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 String |
toBase64(org.apache.calcite.avatica.util.ByteString string)
SQL TO_BASE64(string) function for binary string.
|
static String |
toBase64(String string)
SQL TO_BASE64(string) function.
|
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(Object o) |
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(Object o) |
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. |
static String |
trim(boolean left,
boolean right,
String seek,
String s)
SQL
TRIM(... seek FROM s) function. |
static String |
trim(boolean left,
boolean right,
String seek,
String s,
boolean strict) |
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 int |
unixDate(int v)
|
static long |
unixMicros(long v)
|
static long |
unixMillis(long v)
|
static long |
unixSeconds(long v)
|
static String |
upper(String s)
SQL UPPER(string) function.
|
static String |
user(DataContext root)
SQL
USER function. |
public static String toBase64(org.apache.calcite.avatica.util.ByteString string)
public static org.apache.calcite.avatica.util.ByteString fromBase64(String base64)
@Nonnull public static String md5(@Nonnull org.apache.calcite.avatica.util.ByteString string)
@Nonnull public static String sha1(@Nonnull org.apache.calcite.avatica.util.ByteString string)
public static String regexpReplace(String s, String regex, String replacement)
REGEXP_REPLACE function with 3 arguments.public static String regexpReplace(String s, String regex, String replacement, int pos)
REGEXP_REPLACE function with 4 arguments.public static String regexpReplace(String s, String regex, String replacement, int pos, int occurrence)
REGEXP_REPLACE function with 5 arguments.public static String regexpReplace(String s, String regex, String replacement, int pos, int occurrence, String matchType)
REGEXP_REPLACE function with 6 arguments.public static String substring(String c, int s, int l)
public static org.apache.calcite.avatica.util.ByteString substring(org.apache.calcite.avatica.util.ByteString c,
int s,
int l)
public static org.apache.calcite.avatica.util.ByteString substring(org.apache.calcite.avatica.util.ByteString c,
int s)
public static int ascii(String s)
public static String space(int n)
public static int difference(String s0, String s1)
@Nonnull public static String left(@Nonnull String s, int n)
@Nonnull public static org.apache.calcite.avatica.util.ByteString left(@Nonnull org.apache.calcite.avatica.util.ByteString s, int n)
@Nonnull public static String right(@Nonnull String s, int n)
@Nonnull public static org.apache.calcite.avatica.util.ByteString right(@Nonnull org.apache.calcite.avatica.util.ByteString s, int n)
public static String chr(long n)
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 left, boolean right, 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)
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 (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 eq(String s0, String s1, Comparator<String> comparator)
= operator applied to String values with a certain Comparator.public static boolean eqAny(Object b0, Object b1)
= operator applied to Object values (at least one operand
has ANY type; neither may be null).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 ne(String s0, String s1, Comparator<String> comparator)
<gt; operator applied to OString values with a certain Comparator.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(String b0, String b1, Comparator<String> comparator)
< operator applied to String 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(String b0, String b1, Comparator<String> comparator)
≤ operator applied to String 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(String b0, String b1, Comparator<String> comparator)
> operator applied to String 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(String b0, String b1, Comparator<String> comparator)
≥ operator applied to String 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).public static long bitAnd(long b0,
long b1)
BIT_AND applied to integer values.public static org.apache.calcite.avatica.util.ByteString bitAnd(org.apache.calcite.avatica.util.ByteString b0,
org.apache.calcite.avatica.util.ByteString b1)
BIT_AND applied to binary values.public static long bitOr(long b0,
long b1)
BIT_OR applied to integer values.public static org.apache.calcite.avatica.util.ByteString bitOr(org.apache.calcite.avatica.util.ByteString b0,
org.apache.calcite.avatica.util.ByteString b1)
BIT_OR applied to binary values.public static long bitXor(long b0,
long b1)
BIT_XOR applied to integer values.public static org.apache.calcite.avatica.util.ByteString bitXor(org.apache.calcite.avatica.util.ByteString b0,
org.apache.calcite.avatica.util.ByteString b1)
BIT_XOR applied to binary values.public static double exp(double b0)
EXP operator applied to double values.public static double exp(BigDecimal 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(BigDecimal b0, double b1)
public static double power(BigDecimal b0, BigDecimal b1)
public static double ln(double d)
LN(number) function applied to double 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(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 BigDecimal 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(BigDecimal b0)
ACOS operator applied to BigDecimal values.public static double acos(double b0)
ACOS operator applied to double 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(BigDecimal b0)
ATAN operator applied to BigDecimal values.public static double atan(double b0)
ATAN operator applied to double values.public static double atan2(double b0,
BigDecimal b1)
ATAN2 operator applied to double/BigDecimal values.public static double atan2(BigDecimal b0, double b1)
ATAN2 operator applied to BigDecimal/double 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 cbrt(BigDecimal b)
CBRT operator applied to BigDecimal values.public static double cbrt(double b)
CBRT operator applied to double 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 cosh(BigDecimal b)
COSH operator applied to BigDecimal values.public static double cosh(double b)
COSH operator applied to double 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(BigDecimal b0)
DEGREES operator applied to BigDecimal values.public static double degrees(double b0)
DEGREES operator applied to double 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(BigDecimal b0)
SIN operator applied to BigDecimal values.public static double sin(double b0)
SIN operator applied to double values.public static double sinh(BigDecimal b)
SINH operator applied to BigDecimal values.public static double sinh(double b)
SINH operator applied to double 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 double tanh(BigDecimal b)
TANH operator applied to BigDecimal values.public static double tanh(double b)
TANH 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 timestampSeconds(long v)
public static long timestampMillis(long v)
public static long timestampMicros(long v)
public static long unixSeconds(long v)
public static long unixMillis(long v)
public static long unixMicros(long v)
public static int dateFromUnixDate(int v)
public static int unixDate(int 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 int lastDay(int date)
LAST_DAY function.date - days since epochpublic static int lastDay(long timestamp)
LAST_DAY function.timestamp - milliseconds from epochpublic static String dayNameWithTimestamp(long timestamp, Locale locale)
DAYNAME function, applied to a TIMESTAMP argument.timestamp - Milliseconds from epochlocale - Localepublic static String dayNameWithDate(int date, Locale locale)
DAYNAME function, applied to a DATE argument.date - Days since epochlocale - Localepublic static String monthNameWithTimestamp(long timestamp, Locale locale)
MONTHNAME function, applied to a TIMESTAMP argument.timestamp - Milliseconds from epochlocale - Localepublic static String monthNameWithDate(int date, Locale locale)
MONTHNAME function, applied to a DATE argument.date - Days from epochlocale - Localepublic 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 user(DataContext root)
USER function.public static String systemUser(DataContext root)
SYSTEM_USER function.public static Locale locale(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.public static boolean memberOf(Object object, Collection collection)
public static <E> Collection<E> multisetIntersectDistinct(Collection<E> c1, Collection<E> c2)
public static <E> Collection<E> multisetIntersectAll(Collection<E> c1, Collection<E> c2)
public static <E> Collection<E> multisetExceptAll(Collection<E> c1, Collection<E> c2)
public static <E> Collection<E> multisetExceptDistinct(Collection<E> c1, Collection<E> c2)
public static boolean isASet(Collection collection)
public static boolean submultisetOf(Collection possibleSubMultiset, Collection multiset)
public static Collection multisetUnionDistinct(Collection collection1, Collection collection2)
public static Collection multisetUnionAll(Collection collection1, Collection collection2)
public static org.apache.calcite.linq4j.function.Function1<Object,org.apache.calcite.linq4j.Enumerable<Comparable>> flatList()
public static org.apache.calcite.linq4j.function.Function1<Object,org.apache.calcite.linq4j.Enumerable<FlatLists.ComparableList<Comparable>>> flatProduct(int[] fieldCounts, boolean withOrdinality, SqlFunctions.FlatProductInputType[] inputTypes)
public static <E extends Comparable> org.apache.calcite.linq4j.Enumerable<FlatLists.ComparableList<E>> product(List<org.apache.calcite.linq4j.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)
public static int subtractMonths(int date0,
int date1)
public static int subtractMonths(long t0,
long t1)
public static Object structAccess(Object structObject, int index, String fieldName)
. (field access) operator on an object
whose type is not known until runtime.
A struct object can be represented in various ways by the
runtime and depends on the
JavaRowFormat.
Copyright © 2012-2020 Apache Software Foundation. All Rights Reserved.