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 @Nullable Object |
arrayItem(List list,
int item)
Helper for "array element reference".
|
static @Nullable Object |
arrayItemOptional(@Nullable List list,
int item)
As
arrayItem(java.util.List, int) method, but allows array to be nullable. |
static @PolyNull 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 @Nullable String |
charFromAscii(int n)
SQL CHAR(integer) function, as in MySQL and Spark.
|
static String |
charFromUtf8(int n)
SQL CHR(integer) function, as in Oracle and Postgres.
|
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 String |
concatMulti(String... args)
SQL
CONCAT(arg0, arg1, arg2, ...) function. |
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 @PolyNull BigDecimal |
divide(@PolyNull BigDecimal b0,
@PolyNull BigDecimal b1)
SQL
/ operator applied to BigDecimal values. |
static int |
divide(int b0,
BigDecimal b1) |
static @PolyNull Integer |
divide(@PolyNull Integer b0,
int b1)
SQL
/ operator applied to int values; left side may be
null. |
static @PolyNull Integer |
divide(@PolyNull Integer b0,
@PolyNull Integer b1)
SQL
/ operator applied to nullable int values. |
static @PolyNull Long |
divide(@PolyNull Integer b0,
@PolyNull 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 @PolyNull Integer |
divide(int b0,
@PolyNull Integer b1)
SQL
/ operator applied to int values; right side may be
null. |
static long |
divide(long b0,
BigDecimal b1) |
static @PolyNull Long |
divide(Long b0,
@PolyNull Integer b1)
SQL
/ operator applied to nullable long and int values. |
static @PolyNull Object |
divideAny(@PolyNull Object b0,
@PolyNull Object b1)
SQL
/ operator applied to Object values (at least one operand
has ANY type; either may be null). |
static @Nullable 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(@Nullable Object[] b0,
@Nullable 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<List<Object>,org.apache.calcite.linq4j.Enumerable<Object>> |
flatList()
Function that, given a certain List containing single-item structs (i.e.
|
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 @Nullable 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 boolean |
ilike(String s,
String pattern)
SQL
ILIKE function. |
static boolean |
ilike(String s,
String pattern,
String escape)
SQL
ILIKE function with escape. |
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(@PolyNull 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(@PolyNull 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(@PolyNull Long v) |
static boolean |
isASet(Collection collection)
Support the IS A SET function.
|
static boolean |
isFalse(@Nullable Boolean b)
NULL → FALSE, FALSE → TRUE, TRUE → FALSE.
|
static boolean |
isNotFalse(@Nullable Boolean b)
NULL → TRUE, FALSE → FALSE, TRUE → TRUE.
|
static boolean |
isNotTrue(@Nullable Boolean b)
NULL → TRUE, FALSE → TRUE, TRUE → FALSE.
|
static boolean |
isTrue(@Nullable Boolean b)
NULL → FALSE, FALSE → FALSE, TRUE → TRUE.
|
static @Nullable Object |
item(Object object,
Object index)
Implements the {@code [ ...
|
static @Nullable Object |
itemOptional(@Nullable 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 @Nullable Object |
mapItem(Map map,
Object item)
Helper for "map element reference".
|
static @Nullable Object |
mapItemOptional(@Nullable 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(@Nullable Object object,
Collection collection)
Support the MEMBER OF function.
|
static @PolyNull BigDecimal |
minus(@PolyNull BigDecimal b0,
@PolyNull BigDecimal b1)
SQL
- operator applied to nullable BigDecimal values. |
static @PolyNull Integer |
minus(@PolyNull Integer b0,
int b1)
SQL
- operator applied to int values; left side may be
null. |
static @PolyNull Integer |
minus(@PolyNull Integer b0,
@PolyNull Integer b1)
SQL
- operator applied to nullable int values. |
static @PolyNull Long |
minus(@PolyNull Integer b0,
@PolyNull 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 @PolyNull Integer |
minus(int b0,
@PolyNull Integer b1)
SQL
- operator applied to int values; right side may be
null. |
static @PolyNull Long |
minus(@PolyNull Long b0,
@PolyNull Integer b1)
SQL
- operator applied to nullable long and int values. |
static @PolyNull Object |
minusAny(@PolyNull Object b0,
@PolyNull 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 @PolyNull BigDecimal |
multiply(@PolyNull BigDecimal b0,
@PolyNull BigDecimal b1)
SQL
* operator applied to nullable BigDecimal values. |
static @PolyNull Integer |
multiply(@PolyNull Integer b0,
int b1)
SQL
* operator applied to int values; left side may be
null. |
static @PolyNull Integer |
multiply(@PolyNull Integer b0,
@PolyNull Integer b1)
SQL
* operator applied to nullable int values. |
static @PolyNull Long |
multiply(@PolyNull Integer b0,
@PolyNull 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 @PolyNull Integer |
multiply(int b0,
@PolyNull Integer b1)
SQL
* operator applied to int values; right side may be
null. |
static @PolyNull Long |
multiply(@PolyNull Long b0,
@PolyNull Integer b1)
SQL
* operator applied to nullable long and int values. |
static @PolyNull Object |
multiplyAny(@PolyNull Object b0,
@PolyNull 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 @PolyNull Boolean |
not(@PolyNull Boolean b)
NULL → NULL, FALSE → TRUE, TRUE → FALSE.
|
static int |
octetLength(org.apache.calcite.avatica.util.ByteString s)
SQL OCTET_LENGTH(binary) function.
|
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 @PolyNull BigDecimal |
plus(@PolyNull BigDecimal b0,
@PolyNull BigDecimal b1)
SQL
+ operator applied to BigDecimal values. |
static @PolyNull Integer |
plus(@PolyNull Integer b0,
int b1)
SQL
+ operator applied to int values; left side may be
null. |
static @PolyNull Integer |
plus(@PolyNull Integer b0,
@PolyNull Integer b1)
SQL
+ operator applied to nullable int values. |
static @PolyNull Long |
plus(@PolyNull Integer b0,
@PolyNull 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 @PolyNull Integer |
plus(int b0,
@PolyNull Integer b1)
SQL
+ operator applied to int values; right side may be
null. |
static @PolyNull Long |
plus(@PolyNull Long b0,
@PolyNull Integer b1)
SQL
+ operator applied to nullable long and int values. |
static @PolyNull Object |
plusAny(@PolyNull Object b0,
@PolyNull 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,
@Nullable 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 List |
reverse(List list)
Support the ARRAY_REVERSE 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 boolean |
rlike(String s,
String pattern)
SQL
RLIKE 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 @Nullable Object |
structAccess(@Nullable Object structObject,
int index,
@Nullable String fieldName)
Implements the
. (field access) operator on an object
whose type is not known until runtime. |
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 for binary.
|
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 boolean |
throwUnless(boolean condition,
String message)
Internal THROW_UNLESS(condition, message) function.
|
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 @PolyNull Integer |
toIntOptional(Date v) |
static @PolyNull Integer |
toIntOptional(Date v,
TimeZone timeZone) |
static @PolyNull Integer |
toIntOptional(@PolyNull Object o) |
static @PolyNull 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 @PolyNull Long |
toLongOptional(Date v) |
static @PolyNull Long |
toLongOptional(@PolyNull Object o) |
static @PolyNull Long |
toLongOptional(@PolyNull 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 @PolyNull Long |
toTimestampWithLocalTimeZone(@PolyNull String v) |
static @PolyNull Long |
toTimestampWithLocalTimeZone(@PolyNull String v,
TimeZone timeZone) |
static @PolyNull Integer |
toTimeWithLocalTimeZone(@PolyNull String v) |
static @PolyNull Integer |
toTimeWithLocalTimeZone(@PolyNull 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 {@code TRIM(...
|
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 @PolyNull org.apache.calcite.avatica.util.ByteString |
truncate(@PolyNull 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 @PolyNull String |
truncate(@PolyNull String s,
int maxLength)
Helper for CAST(...
|
static @PolyNull org.apache.calcite.avatica.util.ByteString |
truncateOrPad(@PolyNull org.apache.calcite.avatica.util.ByteString s,
int maxLength)
Helper for CAST(...
|
static @PolyNull String |
truncateOrPad(@PolyNull 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 boolean throwUnless(boolean condition,
String message)
The method is marked NonDeterministic to prevent the generator
from storing its value as a constant.
public static String toBase64(org.apache.calcite.avatica.util.ByteString string)
public static @Nullable org.apache.calcite.avatica.util.ByteString fromBase64(String base64)
public static String md5(org.apache.calcite.avatica.util.ByteString string)
public static String sha1(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, @Nullable 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)
public static org.apache.calcite.avatica.util.ByteString substring(org.apache.calcite.avatica.util.ByteString c,
int s,
int l)
public static int ascii(String s)
public static String space(int n)
public static int difference(String s0, String s1)
public static org.apache.calcite.avatica.util.ByteString left(org.apache.calcite.avatica.util.ByteString s,
int n)
public static org.apache.calcite.avatica.util.ByteString right(org.apache.calcite.avatica.util.ByteString s,
int n)
public static @Nullable String charFromAscii(int n)
Returns the ASCII character of n modulo 256,
or null if n < 0.
public static String charFromUtf8(int n)
Returns the UTF-8 character whose code is n.
public static int octetLength(org.apache.calcite.avatica.util.ByteString s)
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 concatMulti(String... args)
CONCAT(arg0, arg1, arg2, ...) function.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 ilike(String s, String pattern, String escape)
ILIKE 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(@Nullable Object[] b0, @Nullable 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 @PolyNull Integer plus(@PolyNull Integer b0, int b1)
+ operator applied to int values; left side may be
null.public static @PolyNull Integer plus(int b0, @PolyNull Integer b1)
+ operator applied to int values; right side may be
null.public static @PolyNull Integer plus(@PolyNull Integer b0, @PolyNull Integer b1)
+ operator applied to nullable int values.public static @PolyNull Long plus(@PolyNull Long b0, @PolyNull Integer b1)
+ operator applied to nullable long and int values.public static @PolyNull Long plus(@PolyNull Integer b0, @PolyNull Long b1)
+ operator applied to nullable int and long values.public static @PolyNull BigDecimal plus(@PolyNull BigDecimal b0, @PolyNull BigDecimal b1)
+ operator applied to BigDecimal values.public static @PolyNull Object plusAny(@PolyNull Object b0, @PolyNull 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 @PolyNull Integer minus(@PolyNull Integer b0, int b1)
- operator applied to int values; left side may be
null.public static @PolyNull Integer minus(int b0, @PolyNull Integer b1)
- operator applied to int values; right side may be
null.public static @PolyNull Integer minus(@PolyNull Integer b0, @PolyNull Integer b1)
- operator applied to nullable int values.public static @PolyNull Long minus(@PolyNull Long b0, @PolyNull Integer b1)
- operator applied to nullable long and int values.public static @PolyNull Long minus(@PolyNull Integer b0, @PolyNull Long b1)
- operator applied to nullable int and long values.public static @PolyNull BigDecimal minus(@PolyNull BigDecimal b0, @PolyNull BigDecimal b1)
- operator applied to nullable BigDecimal values.public static @PolyNull Object minusAny(@PolyNull Object b0, @PolyNull 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 @PolyNull Integer divide(@PolyNull Integer b0, int b1)
/ operator applied to int values; left side may be
null.public static @PolyNull Integer divide(int b0, @PolyNull Integer b1)
/ operator applied to int values; right side may be
null.public static @PolyNull Integer divide(@PolyNull Integer b0, @PolyNull Integer b1)
/ operator applied to nullable int values.public static @PolyNull Long divide(Long b0, @PolyNull Integer b1)
/ operator applied to nullable long and int values.public static @PolyNull Long divide(@PolyNull Integer b0, @PolyNull Long b1)
/ operator applied to nullable int and long values.public static @PolyNull BigDecimal divide(@PolyNull BigDecimal b0, @PolyNull BigDecimal b1)
/ operator applied to BigDecimal values.public static @PolyNull Object divideAny(@PolyNull Object b0, @PolyNull 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 @PolyNull Integer multiply(@PolyNull Integer b0, int b1)
* operator applied to int values; left side may be
null.public static @PolyNull Integer multiply(int b0, @PolyNull Integer b1)
* operator applied to int values; right side may be
null.public static @PolyNull Integer multiply(@PolyNull Integer b0, @PolyNull Integer b1)
* operator applied to nullable int values.public static @PolyNull Long multiply(@PolyNull Long b0, @PolyNull Integer b1)
* operator applied to nullable long and int values.public static @PolyNull Long multiply(@PolyNull Integer b0, @PolyNull Long b1)
* operator applied to nullable int and long values.public static @PolyNull BigDecimal multiply(@PolyNull BigDecimal b0, @PolyNull BigDecimal b1)
* operator applied to nullable BigDecimal values.public static @PolyNull Object multiplyAny(@PolyNull Object b0, @PolyNull 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 @PolyNull Long toLongOptional(@PolyNull Timestamp v, TimeZone timeZone)
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(@PolyNull Integer v)
internalToDate(int) but allows nulls.public static Time internalToTime(int v)
Time).public static @PolyNull Integer toTimeWithLocalTimeZone(@PolyNull String v, TimeZone timeZone)
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 @PolyNull Long toTimestampWithLocalTimeZone(@PolyNull String v)
public static @PolyNull Long toTimestampWithLocalTimeZone(@PolyNull String v, TimeZone timeZone)
public static @PolyNull String truncate(@PolyNull String s, int maxLength)
public static @PolyNull String truncateOrPad(@PolyNull String s, int maxLength)
public static @PolyNull org.apache.calcite.avatica.util.ByteString truncate(@PolyNull org.apache.calcite.avatica.util.ByteString s,
int maxLength)
public static @PolyNull org.apache.calcite.avatica.util.ByteString truncateOrPad(@PolyNull 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 @Nullable Object arrayItem(List list, int item)
public static @Nullable Object mapItem(Map map, Object item)
public static @Nullable Object item(Object object, Object index)
[ ... ] operator on an object whose type is not
known until runtime.public static @Nullable Object arrayItemOptional(@Nullable List list, int item)
arrayItem(java.util.List, int) method, but allows array to be nullable.public static @Nullable Object mapItemOptional(@Nullable Map map, Object item)
mapItem(java.util.Map, java.lang.Object) method, but allows map to be nullable.public static @Nullable Object itemOptional(@Nullable Object object, Object index)
item(java.lang.Object, java.lang.Object) method, but allows object to be nullable.public static boolean isTrue(@Nullable Boolean b)
public static boolean isFalse(@Nullable Boolean b)
public static boolean isNotTrue(@Nullable Boolean b)
public static boolean isNotFalse(@Nullable Boolean b)
public static @PolyNull Boolean not(@PolyNull 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(@Nullable 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<List<Object>,org.apache.calcite.linq4j.Enumerable<Object>> 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 @Nullable Object structAccess(@Nullable Object structObject, int index, @Nullable 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-2022 Apache Software Foundation. All Rights Reserved.