Class SqlFunctions
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.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classState forFORMAT_DATE,FORMAT_TIMESTAMP,FORMAT_DATETIME,FORMAT_TIME,TO_CHARfunctions.static classState forFORMAT_DATE,FORMAT_TIMESTAMP,FORMAT_DATETIME,FORMAT_TIME,TO_CHARfunctions.static classState forPARSE_DATE,PARSE_TIMESTAMP,PARSE_DATETIME,PARSE_TIMEfunctions.static enumType of argument passed intoflatProduct(int[], boolean, org.apache.calcite.runtime.SqlFunctions.FlatProductInputType[]).static enumSpecifies scope to search for#containsSubstr.static classState forLIKE,ILIKE.static classState forPARSE_URL.static classState for posix regex function.static classState forREGEXP_CONTAINS,REGEXP_EXTRACT,REGEXP_EXTRACT_ALL,REGEXP_INSTR,REGEXP_REPLACE,RLIKE.static classState forSIMILARfunction with escape.static classState forSIMILARfunction.
- 
Method SummaryModifier and TypeMethodDescriptionstatic byteabs(byte b0) SQLABSoperator applied to byte values.static doubleabs(double b0) SQLABSoperator applied to double values.static floatabs(float b0) SQLABSoperator applied to float values.static intabs(int b0) SQLABSoperator applied to int values.static longabs(long b0) SQLABSoperator applied to long values.static shortabs(short b0) SQLABSoperator applied to short values.static BigDecimalabs(BigDecimal b0) SQLABSoperator applied to BigDecimal values.static doubleacos(double b0) SQLACOSoperator applied to double values.static doubleacos(BigDecimal b0) SQLACOSoperator applied to BigDecimal values.static doubleacosd(double b0) SQLACOSDoperator applied to double values.static doubleacosd(BigDecimal b0) SQLACOSDoperator applied to BigDecimal values.static doubleacosh(double b0) SQLACOSHoperator applied to double values.static doubleacosh(BigDecimal b0) SQLACOSHoperator applied to BigDecimal values.static Object[]static ListarrayAppend(List list, Object element) Support the ARRAY_APPEND function.static ListarrayExcept(List list1, List list2) Support the ARRAY_EXCEPT function.static @Nullable ListarrayInsert(List baselist, Object pos, Object val) Support the ARRAY_INSERT function.static ListarrayIntersect(List list1, List list2) Support the ARRAY_INTERSECT function.static @Nullable ObjectHelper for "array element reference".static @Nullable ObjectarrayItemOptional(@Nullable List list, int item, int offset, boolean safe) AsarrayItem(java.util.List, int, int, boolean)method, but allows array to be nullable.static <T extends Object & Comparable<? super T>>
 @Nullable TSupport the ARRAY_MAX function.static <T extends Object & Comparable<? super T>>
 @Nullable TSupport the ARRAY_MIN function.static LongarrayPosition(List list, Object element) Support the ARRAY_POSITION function.static ListarrayPrepend(List list, Object element) Support the ARRAY_PREPEND function.static ListarrayRemove(List list, Object element) Support the ARRAY_REMOVE function.arrayRepeat(Object element, Object count) Support the ARRAY_REPEAT function.static ListarraySlice(List list, int start, int length) SQLARRAY_SLICE(array, start, length)function.static @Nullable BooleanarraysOverlap(List list1, List list2) Support the ARRAYS_OVERLAP function.static ListSupport the ARRAYS_ZIP function.static @PolyNull ListarrayToList(@PolyNull Array a) Converts a JDBC array to a list.static StringarrayToString(List list, String delimiter) SQLARRAY_TO_STRING(array, delimiter)function.static StringarrayToString(List list, String delimiter, @Nullable String nullText) SQLARRAY_TO_STRING(array, delimiter, nullText)function.static ListarrayUnion(List list1, List list2) Support the ARRAY_UNION function.static intSQL ASCII(string) function.static doubleasin(double b0) SQLASINoperator applied to double values.static doubleasin(BigDecimal b0) SQLASINoperator applied to BigDecimal values.static doubleasind(double b0) SQLASINDoperator applied to double values.static doubleasind(BigDecimal b0) SQLASINDoperator applied to BigDecimal values.static doubleasinh(double b0) SQLASINHoperator applied to double values.static doubleasinh(BigDecimal b0) SQLASINHoperator applied to BigDecimal values.static doubleatan(double b0) SQLATANoperator applied to double values.static doubleatan(BigDecimal b0) SQLATANoperator applied to BigDecimal values.static doubleatan2(double b0, double b1) SQLATAN2operator applied to double values.static doubleatan2(double b0, BigDecimal b1) SQLATAN2operator applied to double/BigDecimal values.static doubleatan2(BigDecimal b0, double b1) SQLATAN2operator applied to BigDecimal/double values.static doubleatan2(BigDecimal b0, BigDecimal b1) SQLATAN2operator applied to BigDecimal values.static doubleatand(double b0) SQLATANDoperator applied to double values.static doubleatand(BigDecimal b0) SQLATANoperator applied to BigDecimal values.static doubleatanh(double b) SQLATANHoperator applied to double values.static doubleatanh(BigDecimal b) SQLATANHoperator applied to BigDecimal values.static Stringbin(long value) SQL BIN(long) function.static UUIDbinaryToUuid(org.apache.calcite.avatica.util.ByteString bytes) static longBitwise functionBITANDapplied to a Long and int value.static longbitAnd(long b0, long b1) Bitwise functionBIT_ANDapplied to integer values.static longBitwise functionBITANDapplied to a Long and int value.static org.apache.calcite.avatica.util.ByteStringbitAnd(org.apache.calcite.avatica.util.ByteString b0, org.apache.calcite.avatica.util.ByteString b1) Bitwise functionBIT_ANDapplied to binary values.static longbitCount(long b) Helper function for implementingBITCOUNT.static longHelper function for implementingBITCOUNT.static longbitCount(org.apache.calcite.avatica.util.ByteString b) Helper function for implementingBITCOUNT.static longHelper function for implementing MySQLBIT_COUNT.static longHelper function for implementing MySQLBIT_COUNT.static longHelper function for implementing MySQLBIT_COUNT.static longHelper function for implementing MySQLBIT_COUNT.static longHelper function for implementing MySQLBIT_COUNT.static longHelper function for implementing MySQLBIT_COUNT.static bytebitGet(byte value, int position) SQL BIT_GET(value, position) function.static bytebitGet(int value, int position) SQL BIT_GET(value, position) function.static bytebitGet(long value, int position) SQL BIT_GET(value, position) function.static bytebitGet(short value, int position) SQL BIT_GET(value, position) function.static intSQL BIT_LENGTH(string) function.static intbitLength(org.apache.calcite.avatica.util.ByteString s) SQL BIT_LENGTH(binary) function.static longbitNot(long b) Bitwise functionBIT_NOTapplied to integer values.static org.apache.calcite.avatica.util.ByteStringbitNot(org.apache.calcite.avatica.util.ByteString b) Bitwise functionBIT_NOTapplied to a binary value.static longBitwise functionBITORapplied to a Long and int value.static longbitOr(long b0, long b1) Bitwise functionBIT_ORapplied to integer values.static longBitwise functionBITORapplied to a Long and int value.static org.apache.calcite.avatica.util.ByteStringbitOr(org.apache.calcite.avatica.util.ByteString b0, org.apache.calcite.avatica.util.ByteString b1) Bitwise functionBIT_ORapplied to binary values.static longBitwise functionBITXORapplied to a Long and int value.static longbitXor(long b0, long b1) Bitwise functionBIT_XORapplied to integer values.static longBitwise functionBITXORapplied to a Long and int value.static org.apache.calcite.avatica.util.ByteStringbitXor(org.apache.calcite.avatica.util.ByteString b0, org.apache.calcite.avatica.util.ByteString b1) Bitwise functionBIT_XORapplied to binary values.static doublecbrt(double b) SQLCBRToperator applied to double values.static doublecbrt(BigDecimal b) SQLCBRToperator applied to BigDecimal values.static byteceil(byte b0, byte b1) SQLCEILoperator applied to byte values.static doubleceil(double b0) static floatceil(float b0) static intceil(int b0, int b1) SQLCEILoperator applied to int values.static intceil(int b0, BigDecimal b1) static longceil(long b0, long b1) SQLCEILoperator applied to long values.static shortceil(short b0, short b1) SQLCEILoperator applied to short values.static BigDecimalceil(BigDecimal b0) static BigDecimalceil(BigDecimal b0, int b1) static BigDecimalceil(BigDecimal b0, BigDecimal b1) static @Nullable StringcharFromAscii(int n) SQL CHAR(integer) function, as in MySQL and Spark.static StringcharFromUtf8(int n) SQL CHR(integer) function, as in Oracle and Postgres.static intcharLength(String s) SQL CHARACTER_LENGTH(string) function.static bytecheckedDivide(byte b0, byte b1) static intcheckedDivide(int b0, int b1) static longcheckedDivide(long b0, long b1) static shortcheckedDivide(short b0, short b1) static bytecheckedMinus(byte b0, byte b1) static intcheckedMinus(int b0, int b1) static longcheckedMinus(long b0, long b1) static shortcheckedMinus(short b0, short b1) static bytecheckedMultiply(byte b0, byte b1) static intcheckedMultiply(int b0, int b1) static longcheckedMultiply(long b0, long b1) static shortcheckedMultiply(short b0, short b1) static bytecheckedPlus(byte b0, byte b1) static intcheckedPlus(int b0, int b1) static longcheckedPlus(long b0, long b1) static shortcheckedPlus(short b0, short b1) static bytecheckedUnaryMinus(byte b) static intcheckedUnaryMinus(int b) static longcheckedUnaryMinus(long b) static shortcheckedUnaryMinus(short b) static @Nullable org.apache.calcite.avatica.util.ByteStringcodePointsToBytes(List codePoints) SQL CODE_POINTS_TO_BYTES(list) function.static @Nullable StringcodePointsToString(List codePoints) SQL CODE_POINTS_TO_STRING(list) function.static ListSupport the ARRAY_COMPACT function.static StringSQLstring || stringoperator.static org.apache.calcite.avatica.util.ByteStringconcat(org.apache.calcite.avatica.util.ByteString s0, org.apache.calcite.avatica.util.ByteString s1) SQLbinary || binaryoperator.static StringconcatMulti(String... args) SQLCONCAT(arg0, arg1, arg2, ...)function.static StringconcatMultiObjectWithSeparator(String sep, Object... args) SQLCONCAT_WS(sep[, any]+)function, return null for null sep.static StringconcatMultiTypeWithSeparator(String sep, Object... args) SQLCONCAT_WS(sep[, str | array(str)]+)function, return null for null sep.static StringconcatMultiWithNull(String... args) SQLCONCAT(arg0, ...)function which can accept null but never return null.static StringconcatMultiWithSeparator(String... args) SQLCONCAT_WS(sep, arg1, arg2, ...)function; treats null arguments as empty strings.static @Nullable StringconcatWithNull(@Nullable String s0, @Nullable String s1) Concatenates two strings.static booleancontainsSubstr(boolean s, String substr) SQLCONTAINS_SUBSTR(boolean, substr)operator.static booleancontainsSubstr(int s, String substr) SQLCONTAINS_SUBSTR(int, substr)operator.static booleancontainsSubstr(long s, String substr) SQLCONTAINS_SUBSTR(long, substr)operator.static @Nullable BooleancontainsSubstr(Object[] rows, String substr) SQLCONTAINS_SUBSTR(rows, substr)operator.static booleancontainsSubstr(Object expr, String substr) SQLCONTAINS_SUBSTR(expr, substr)operator.static booleancontainsSubstr(String jsonString, String substr, String jsonScope) SQLCONTAINS_SUBSTR(jsonString, substr, json_scope=>jsonScope)operator.static @Nullable BooleancontainsSubstr(List arr, String substr) SQLCONTAINS_SUBSTR(arr, substr)operator.static StringconvertOracle(String s, String... args) Oracle'sCONVERT(charValue, destCharsetName[, srcCharsetName])function, return null if s is null or empty.static StringconvertWithCharset(String s, String srcCharset, String destCharset) SQLCONVERT(s, src_charset, dest_charset)function.static doublecos(double b0) SQLCOSoperator applied to double values.static doublecos(BigDecimal b0) SQLCOSoperator applied to BigDecimal values.static doublecosd(double b0) SQLCOSDoperator applied to double values.static doublecosd(BigDecimal b0) SQLCOSDoperator applied to BigDecimal values.static doublecosh(double b) SQLCOSHoperator applied to double values.static doublecosh(BigDecimal b) SQLCOSHoperator applied to BigDecimal values.static doublecot(double b0) SQLCOToperator applied to double values.static doublecot(BigDecimal b0) SQLCOToperator applied to BigDecimal values.static doublecoth(double b0) SQLCOTHoperator applied to double values.static doublecoth(BigDecimal b0) SQLCOTHoperator applied to BigDecimal values.static longSQL CRC32(string) function.static longcrc32(org.apache.calcite.avatica.util.ByteString value) SQL CRC32(string) function for binary string.static doublecsc(double b0) SQLCSCoperator applied to double values.static doublecsc(BigDecimal b0) SQLCSCoperator applied to BigDecimal values.static doublecsch(double b0) SQLCSCHoperator applied to double values.static doublecsch(BigDecimal b0) SQLCSCHoperator applied to BigDecimal values.static intcurrentDate(DataContext root) SQLCURRENT_DATEfunction.static LongcurrentDatetime(DataContext root) SQLCURRENT_DATETIMEfunction.static @Nullable LongcurrentDatetime(DataContext root, @Nullable String timezone) SQLCURRENT_DATETIMEfunction with a specified timezone.static intcurrentTime(DataContext root) SQLCURRENT_TIMEfunction.static longcurrentTimestamp(DataContext root) SQLCURRENT_TIMESTAMPfunction.static intcustomDateAdd(DataContext root, String timeFrameName, int interval, int date) SQLDATEADDfunction applied to a custom time frame.static intcustomDateCeil(DataContext root, String timeFrameName, int date) SQLCEILfunction applied to aDATEvalue and a custom time frame.static intcustomDateDiff(DataContext root, String timeFrameName, int date, int date2) SQLDATEDIFFfunction applied to a custom time frame.static intcustomDateFloor(DataContext root, String timeFrameName, int date) SQLFLOORfunction applied to aDATEvalue and a custom time frame.static longcustomTimestampAdd(DataContext root, String timeFrameName, long interval, long timestamp) SQLTIMESTAMPADDfunction applied to a custom time frame.static longcustomTimestampCeil(DataContext root, String timeFrameName, long timestamp) SQLCEILfunction applied to aTIMESTAMPvalue and a custom time frame.static longcustomTimestampDiff(DataContext root, String timeFrameName, long timestamp, long timestamp2) SQLTIMESTAMPDIFFfunction applied to a custom time frame.static longcustomTimestampFloor(DataContext root, String timeFrameName, long timestamp) SQLFLOORfunction applied to aTIMESTAMPvalue and a custom time frame.static intdate(int year, int month, int day) SQLDATE(year, month, day)function.static intdate(long timestampMillis) SQLDATE(TIMESTAMP)andDATE(TIMESTAMP WITH LOCAL TIME ZONE)functions.static intSQLDATE(TIMESTAMP WITH LOCAL TIME, timeZone)function.static intdateFromUnixDate(int v) static longdatetime(int daysSinceEpoch) SQLDATETIME(DATE)function; returns a Calcite TIMESTAMP.static longdatetime(int daysSinceEpoch, int millisSinceMidnight) SQLDATETIME(DATE, TIME)function; returns a Calcite TIMESTAMP.static longdatetime(int year, int month, int day, int hour, int minute, int second) SQLDATETIME(<year>, <month>, <day>, <hour>, <minute>, <second>)function.static longdatetime(long millisSinceEpoch) SQLDATETIME(TIMESTAMP WITH LOCAL TIME ZONE)function; returns a Calcite TIMESTAMP.static longSQLDATETIME(TIMESTAMP, timeZone)function; returns a Calcite TIMESTAMP.static StringdayNameWithDate(int date, Locale locale) SQLDAYNAMEfunction, applied to a DATE argument.static StringdayNameWithTimestamp(long timestamp, Locale locale) SQLDAYNAMEfunction, applied to a TIMESTAMP argument.static doubledegrees(double b0) SQLDEGREESoperator applied to double values.static doubledegrees(BigDecimal b0) SQLDEGREESoperator applied to BigDecimal values.static intdifference(String s0, String s1) SQL DIFFERENCE(string, string) function.static ListSupport the ARRAY_DISTINCT function.static intdivide(int b0, int b1) SQL/operator applied to int values.static @PolyNull IntegerSQL/operator applied to int values; right side may be null.static intdivide(int b0, BigDecimal b1) static longdivide(long b0, BigDecimal b1) static @PolyNull IntegerSQL/operator applied to int values; left side may be null.static @PolyNull IntegerSQL/operator applied to nullable int values.static @PolyNull LongSQL/operator applied to nullable int and long values.static @PolyNull LongSQL/operator applied to nullable long and int values.static @PolyNull BigDecimaldivide(@PolyNull BigDecimal b0, @PolyNull BigDecimal b1) SQL/operator applied to BigDecimal values.static @PolyNull ObjectSQL/operator applied to Object values (at least one operand has ANY type; either may be null).static @Nullable ObjectSupport the ELEMENT function.static booleanSQLENDS_WITH(string, string)function.static booleanendsWith(org.apache.calcite.avatica.util.ByteString s0, org.apache.calcite.avatica.util.ByteString s1) SQLENDS_WITH(binary, binary)function.static booleanSQL=operator applied to Object[] values (neither may be null).static booleanSQL=operator applied to Object values (including String; neither side may be null).static booleaneq(String s0, String s1, Comparator<String> comparator) SQL=operator applied to String values with a certain Comparator.static booleaneq(BigDecimal b0, BigDecimal b1) SQL=operator applied to BigDecimal values (neither may be null).static booleanSQL=operator applied to Object values (at least one operand has ANY type; neither may be null).static @Nullable BooleanSupport the EXISTS(list, function1) function.static Booleanexists(List list, Predicate1 predicate1) Support the EXISTS(list, predicate1) function.static doubleexp(double b0) SQLEXPoperator applied to double values.static doubleexp(BigDecimal b0) static @Nullable Longfactorial(int b0) SQLFACTORIALoperator.static @Nullable IntegerSQL FIND_IN_SET(matchStr, textStr) function.static Function1<List<Object>,Enumerable<Object>> flatList()Function that, given a certain List containing single-item structs (i.e.flatProduct(int[] fieldCounts, boolean withOrdinality, SqlFunctions.FlatProductInputType[] inputTypes) static bytefloor(byte b0, byte b1) SQLFLOORoperator applied to byte values.static doublefloor(double b0) static floatfloor(float b0) static intfloor(int b0, int b1) SQLFLOORoperator applied to int values.static intfloor(int b0, BigDecimal b1) static longfloor(long b0, long b1) SQLFLOORoperator applied to long values.static shortfloor(short b0, short b1) SQLFLOORoperator applied to short values.static BigDecimalfloor(BigDecimal b0) static BigDecimalfloor(BigDecimal b0, int b1) static BigDecimalfloor(BigDecimal b0, BigDecimal b1) static StringformatNumber(double value, int decimalVal) static StringformatNumber(double value, String format) static StringformatNumber(long value, int decimalVal) SQL FORMAT_NUMBER(value, decimalOrFormat) function.static StringformatNumber(long value, String format) static StringformatNumber(BigDecimal value, int decimalVal) static StringformatNumber(BigDecimal value, String format) static org.apache.calcite.avatica.util.ByteStringfromBase32(String base32) SQL FROM_BASE32(string) function.static @Nullable org.apache.calcite.avatica.util.ByteStringfromBase64(String base64) SQL FROM_BASE64(string)/UNBASE64(string) function.static org.apache.calcite.avatica.util.ByteStringSQL FROM_HEX(varchar) function.static booleange(boolean b0, boolean b1) SQL≥operator applied to boolean values.static booleanSQL≥operator applied to Object[] values.static booleanSQL≥operator applied to String values.static booleange(String b0, String b1, Comparator<String> comparator) SQL≥operator applied to String values.static booleange(BigDecimal b0, BigDecimal b1) SQL≥operator applied to BigDecimal values.static booleanSQL≥operator applied to List values.static booleange(org.apache.calcite.avatica.util.ByteString b0, org.apache.calcite.avatica.util.ByteString b1) SQL≥operator applied to ByteString values.static booleanSQL≥operator applied to Object values (at least one operand has ANY type; neither may be null).static StringgetFormatPattern(int decimalVal) static booleangreater(boolean b0, boolean b1) static bytegreater(byte b0, byte b1) static chargreater(char b0, char b1) static doublegreater(double b0, double b1) static floatgreater(float b0, float b1) static intgreater(int b0, int b1) static longgreater(long b0, long b1) static shortgreater(short b0, short b1) static <T extends Comparable<T>>
 @Nullable Tgreater(@Nullable T b0, @Nullable T b1) Helper for implementing MAX.static <T extends Comparable<T>>
 @Nullable List<T>static <T extends Comparable<T>>
 @Nullable Tgreatest(@Nullable T b0, @Nullable T b1) GREATEST operator.static booleangt(boolean b0, boolean b1) SQL>operator applied to boolean values.static booleangt(byte b0, byte b1) static booleangt(char b0, char b1) static booleangt(double b0, double b1) static booleangt(float b0, float b1) static booleangt(int b0, int b1) static booleangt(long b0, long b1) static booleangt(short b0, short b1) static booleanstatic booleanSQL>operator applied to String values.static booleangt(String b0, String b1, Comparator<String> comparator) SQL>operator applied to String values.static booleangt(BigDecimal b0, BigDecimal b1) SQL>operator applied to BigDecimal values.static booleanstatic booleangt(org.apache.calcite.avatica.util.ByteString b0, org.apache.calcite.avatica.util.ByteString b1) SQL>operator applied to ByteString values.static booleanSQL>operator applied to Object values (at least one operand has ANY type; neither may be null).static <T extends Comparable<T>>
 booleangtNullable(T b0, T b1) Returns whetherb0is greater thanb1(orb1is null).static StringSQL HEX(varchar) function.static StringSQL INITCAP(string) function.static DateinternalToDate(int v) Converts a SQL DATE value from the internal representation type (number of days since January 1st, 1970) to the Java type (Date).static @PolyNull DateinternalToDate(@PolyNull Integer v) Converts a nullable SQL DATE value from the internal representation type (number of days since January 1st, 1970) to the Java type (Date).static TimeinternalToTime(int v) Converts a SQL TIME value from the internal representation type (number of milliseconds since January 1st, 1970) to the Java type (Time).static @PolyNull TimeinternalToTime(@PolyNull Integer v) Converts a nullable SQL TIME value from the internal representation type (number of milliseconds since January 1st, 1970) to the Java type (Time).static TimestampinternalToTimestamp(long v) Converts a SQL TIMESTAMP value from the internal representation type (number of milliseconds since January 1st, 1970) to the Java Type (Timestamp) in the local time zone.static @PolyNull TimestampinternalToTimestamp(@PolyNull Long v) Converts a nullable SQL TIMESTAMP value from the internal representation type (number of milliseconds since January 1st, 1970) to the Java Type (Timestamp) in the local time zone.static booleanisASet(Collection collection) Support the IS A SET function.static booleanNULL → FALSE, FALSE → TRUE, TRUE → FALSE.static booleanisInf(double b0) SQLIS_INFoperator applied to double values.static booleanisInf(float b0) SQLIS_INFoperator applied to float values.static booleanisInf(BigDecimal b0) SQLIS_INFoperator applied to BigDecimal values.static booleanisNaN(double b0) SQLIS_NANoperator applied to double values.static booleanisNaN(float b0) SQLIS_NANoperator applied to float values.static booleanisNaN(BigDecimal b0) SQLIS_NANoperator applied to BigDecimal values.static booleanisNotFalse(@Nullable Boolean b) NULL → TRUE, FALSE → FALSE, TRUE → TRUE.static booleanNULL → TRUE, FALSE → TRUE, TRUE → FALSE.static booleanNULL → FALSE, FALSE → FALSE, TRUE → TRUE.static @Nullable ObjectImplements the[ ... ]operator on an object whose type is not known until runtime.static @Nullable ObjectitemOptional(@Nullable Object object, Object index) Asitem(java.lang.Object, java.lang.Object)method, but allows object to be nullable.static booleanle(boolean b0, boolean b1) SQL≤operator applied to boolean values.static booleanSQL≤operator applied to Object[] values.static booleanSQL≤operator applied to String values.static booleanle(String b0, String b1, Comparator<String> comparator) SQL≤operator applied to String values.static booleanle(BigDecimal b0, BigDecimal b1) SQL≤operator applied to BigDecimal values.static booleanSQL≤operator applied to List values.static booleanle(org.apache.calcite.avatica.util.ByteString b0, org.apache.calcite.avatica.util.ByteString b1) SQL≤operator applied to ByteString values.static booleanSQL≤operator applied to Object values (at least one operand has ANY type; neither may be null).static <T extends Comparable<T>>
 @Nullable Tleast(@Nullable T b0, @Nullable T b1) LEAST operator.static StringSQL LEFT(string, integer) function.static org.apache.calcite.avatica.util.ByteStringleft(org.apache.calcite.avatica.util.ByteString s, int n) SQL LEFT(ByteString, integer) function.static booleanlesser(boolean b0, boolean b1) static bytelesser(byte b0, byte b1) static charlesser(char b0, char b1) static doublelesser(double b0, double b1) static floatlesser(float b0, float b1) static intlesser(int b0, int b1) static longlesser(long b0, long b1) static shortlesser(short b0, short b1) static <T extends Comparable<T>>
 @Nullable Tlesser(@Nullable T b0, @Nullable T b1) Helper for implementing MIN.static <T extends Comparable<T>>
 @Nullable List<T>static intlevenshtein(String string1, String string2) SQL LEVENSHTEIN(string1, string2) function.static Localelocale(DataContext root) static intlocalTime(DataContext root) SQLLOCAL_TIMEfunction.static longlocalTimestamp(DataContext root) SQLLOCAL_TIMESTAMPfunction.static @Nullable Doublelog(double number, double base, boolean nonPositiveIsNull) SQLLOG(number, base)function applied to double values.static @Nullable Doublelog(double number, BigDecimal base, boolean nonPositiveIsNull) SQLLOG(number, base)function applied to double and BigDecimal values.static @Nullable Doublelog(BigDecimal number, double base, Boolean nonPositiveIsNull) SQLLOG(number, base)function applied to BigDecimal and double values.static @Nullable Doublelog(BigDecimal number, BigDecimal base, Boolean nonPositiveIsNull) SQLLOG(number, base)function applied to double values.static @Nullable Doublelog1p(double b0) SQLLOG1Poperator applied to double values.static @Nullable Doublelog1p(BigDecimal b0) SQLLOG1Poperator applied to BigDecimal values.static StringSQL LOWER(string) function.static StringSQLLPAD(string, integer)function.static StringSQLLPAD(string, integer, string)function.static org.apache.calcite.avatica.util.ByteStringlpad(org.apache.calcite.avatica.util.ByteString originalValue, int returnLength) SQLLPAD(binary, integer, binary)function.static org.apache.calcite.avatica.util.ByteStringlpad(org.apache.calcite.avatica.util.ByteString originalValue, int returnLength, org.apache.calcite.avatica.util.ByteString pattern) SQLLPAD(binary, integer, binary)function.static booleanlt(boolean b0, boolean b1) SQL<operator applied to boolean values.static booleanlt(byte b0, byte b1) static booleanlt(char b0, char b1) static booleanlt(double b0, double b1) static booleanlt(float b0, float b1) static booleanlt(int b0, int b1) static booleanlt(long b0, long b1) static booleanlt(short b0, short b1) static booleanstatic booleanSQL<operator applied to String values.static booleanlt(String b0, String b1, Comparator<String> comparator) SQL<operator applied to String values.static booleanlt(BigDecimal b0, BigDecimal b1) SQL<operator applied to BigDecimal values.static booleanstatic booleanlt(org.apache.calcite.avatica.util.ByteString b0, org.apache.calcite.avatica.util.ByteString b1) SQL<operator applied to ByteString values.static booleanSQL<operator applied to Object values.static <T extends Comparable<T>>
 booleanltNullable(T b0, T b1) Returns whetherb0is less thanb1(orb1is null).static StringSQLLTRIMfunction.static MapSupport the MAP function.static MapSupport the MAP_CONCAT function.static BooleanmapContainsKey(Map map, Object key) Support the MAP_CONTAINS_KEY function.static ListmapEntries(Map<Object, Object> map) Support the MAP_ENTRIES function.static MapmapFromArrays(List keysArray, List valuesArray) Support the MAP_FROM_ARRAYS function.static @Nullable MapmapFromEntries(List entries) Support the MAP_FROM_ENTRIES function.static @Nullable ObjectHelper for "map element reference".static @Nullable ObjectmapItemOptional(@Nullable Map map, Object item) AsmapItem(java.util.Map, java.lang.Object)method, but allows map to be nullable.static ListSupport the MAP_KEYS function.static ListSupport the MAP_VALUES function.static StringSQL MD5(string) function.static Stringmd5(org.apache.calcite.avatica.util.ByteString string) SQL MD5(string) function for binary string.static booleanmemberOf(@Nullable Object object, Collection collection) Support the MEMBER OF function.static intminus(int b0, int b1) SQL-operator applied to int values.static @PolyNull IntegerSQL-operator applied to int values; right side may be null.static @PolyNull IntegerSQL-operator applied to int values; left side may be null.static @PolyNull IntegerSQL-operator applied to nullable int values.static @PolyNull LongSQL-operator applied to nullable int and long values.static @PolyNull LongSQL-operator applied to nullable long and int values.static @PolyNull BigDecimalminus(@PolyNull BigDecimal b0, @PolyNull BigDecimal b1) SQL-operator applied to nullable BigDecimal values.static @PolyNull ObjectSQL-operator applied to Object values (at least one operand has ANY type; either may be null).static bytemod(byte b0, byte b1) SQLMODoperator applied to byte values.static intmod(int b0, int b1) SQLMODoperator applied to int values.static BigDecimalmod(int b0, BigDecimal b1) static longmod(long b0, long b1) SQLMODoperator applied to long values.static shortmod(short b0, short b1) SQLMODoperator applied to short values.static BigDecimalmod(BigDecimal b0, int b1) static BigDecimalmod(BigDecimal b0, BigDecimal b1) static StringmonthNameWithDate(int date, Locale locale) SQLMONTHNAMEfunction, applied to a DATE argument.static StringmonthNameWithTimestamp(long timestamp, Locale locale) SQLMONTHNAMEfunction, applied to a TIMESTAMP argument.static intmultiply(int b0, int b1) SQL*operator applied to int values.static @PolyNull IntegerSQL*operator applied to int values; right side may be null.static @PolyNull IntegerSQL*operator applied to int values; left side may be null.static @PolyNull IntegerSQL*operator applied to nullable int values.static @PolyNull LongSQL*operator applied to nullable int and long values.static @PolyNull LongSQL*operator applied to nullable long and int values.static @PolyNull BigDecimalmultiply(@PolyNull BigDecimal b0, @PolyNull BigDecimal b1) SQL*operator applied to nullable BigDecimal values.static @PolyNull ObjectmultiplyAny(@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 CollectionmultisetUnionAll(Collection collection1, Collection collection2) Support the MULTISET UNION ALL function.static CollectionmultisetUnionDistinct(Collection collection1, Collection collection2) Support the MULTISET UNION function.static booleanSQL<gt;operator applied to Object values (including String; neither side may be null).static booleanne(String s0, String s1, Comparator<String> comparator) SQL<gt;operator applied to OString values with a certain Comparator.static booleanne(BigDecimal b0, BigDecimal b1) SQL<gt;operator applied to BigDecimal values.static booleanSQL<gt;operator applied to Object values (at least one operand has ANY type, including String; neither may be null).static @PolyNull BooleanNULL → NULL, FALSE → TRUE, TRUE → FALSE.static <E> @Nullable BooleannullableAll(List<? extends E> list, Function1<E, Boolean> predicate) Returns whetherpredicateis true for all elements oflist.static <E> @Nullable BooleannullableExists(List<? extends E> list, Function1<E, Boolean> predicate) Returns whether there is an element inlistfor whichpredicateis true.static intoctetLength(org.apache.calcite.avatica.util.ByteString s) SQL OCTET_LENGTH(binary) function.static StringSQLOVERLAYfunction.static StringSQLOVERLAYfunction.static org.apache.calcite.avatica.util.ByteStringoverlay(org.apache.calcite.avatica.util.ByteString s, org.apache.calcite.avatica.util.ByteString r, int start) SQLOVERLAYfunction applied to binary strings.static org.apache.calcite.avatica.util.ByteStringoverlay(org.apache.calcite.avatica.util.ByteString s, org.apache.calcite.avatica.util.ByteString r, int start, int length) SQLOVERLAYfunction applied to binary strings.static intplus(int b0, int b1) SQL+operator applied to int values.static @PolyNull IntegerSQL+operator applied to int values; right side may be null.static @PolyNull IntegerSQL+operator applied to int values; left side may be null.static @PolyNull IntegerSQL+operator applied to nullable int values.static @PolyNull LongSQL+operator applied to nullable int and long values.static @PolyNull LongSQL+operator applied to nullable long and int values.static @PolyNull BigDecimalplus(@PolyNull BigDecimal b0, @PolyNull BigDecimal b1) SQL+operator applied to BigDecimal values.static @PolyNull ObjectSQL+operator applied to Object values (at least one operand has ANY type; either may be null).static intSQLPOSITION(seek IN string)function.static intSQLPOSITION(seek IN string FROM integer)function.static intSQLPOSITION(seek, string, from, occurrence)function.static intposition(org.apache.calcite.avatica.util.ByteString seek, org.apache.calcite.avatica.util.ByteString s) SQLPOSITION(seek IN string)function for byte strings.static intposition(org.apache.calcite.avatica.util.ByteString seek, org.apache.calcite.avatica.util.ByteString s, int from) SQLPOSITION(seek IN string FROM integer)function for byte strings.static intposition(org.apache.calcite.avatica.util.ByteString seek, org.apache.calcite.avatica.util.ByteString s, int from, int occurrence) SQLPOSITION(seek, string, from, occurrence)function for byte strings.static doublepower(double b0, double b1) SQLPOWERoperator applied to double values.static doublepower(double b0, BigDecimal b1) static doublepower(BigDecimal b0, double b1) static doublepower(BigDecimal b0, BigDecimal b1) static <E extends Comparable>
 Enumerable<FlatLists.ComparableList<E>>product(List<Enumerator<List<E>>> enumerators, int fieldCount, boolean withOrdinality) Similar toLinq4j.product(Iterable)but each resulting list implementsFlatLists.ComparableList.static doubleradians(double b0) SQLRADIANSoperator applied to double values.static doubleradians(BigDecimal b0) SQLRADIANSoperator applied to BigDecimal values.static StringSQL REPEAT(string, int) function.static StringSQLREPLACE(string, search, replacement)function.static StringSQL REVERSE(string) function.static ListSupport the ARRAY_REVERSE function.static StringSQL RIGHT(string, integer) function.static org.apache.calcite.avatica.util.ByteStringright(org.apache.calcite.avatica.util.ByteString s, int n) SQL RIGHT(ByteString, integer) function.static intround(int v, int x) Helper for rounding.static longround(long v, long x) Helper for rounding.static StringSQLRPAD(string, integer)function.static StringSQLRPAD(string, integer, string)function.static org.apache.calcite.avatica.util.ByteStringrpad(org.apache.calcite.avatica.util.ByteString originalValue, int returnLength) SQLRPAD(binary, integer)function.static org.apache.calcite.avatica.util.ByteStringrpad(org.apache.calcite.avatica.util.ByteString originalValue, int returnLength, org.apache.calcite.avatica.util.ByteString pattern) SQLRPAD(binary, integer, binary)function.static StringSQLRTRIMfunction applied to string.static org.apache.calcite.avatica.util.ByteStringrtrim(org.apache.calcite.avatica.util.ByteString s) Helper for CAST.static @Nullable DoublesafeAdd(double b0, double b1) SQLSAFE_ADDfunction applied to double values.static @Nullable DoublesafeAdd(double b0, long b1) SQLSAFE_ADDfunction applied to double and long values.static @Nullable DoublesafeAdd(double b0, BigDecimal b1) SQLSAFE_ADDfunction applied to double and BigDecimal values.static @Nullable DoublesafeAdd(long b0, double b1) SQLSAFE_ADDfunction applied to long and double values.static @Nullable LongsafeAdd(long b0, long b1) SQLSAFE_ADDfunction applied to long values.static @Nullable BigDecimalsafeAdd(long b0, BigDecimal b1) SQLSAFE_ADDfunction applied to long and BigDecimal values.static @Nullable DoublesafeAdd(BigDecimal b0, double b1) SQLSAFE_ADDfunction applied to BigDecimal and double values.static @Nullable BigDecimalsafeAdd(BigDecimal b0, long b1) SQLSAFE_ADDfunction applied to BigDecimal and long values.static @Nullable BigDecimalsafeAdd(BigDecimal b0, BigDecimal b1) SQLSAFE_ADDfunction applied to BigDecimal values.static @Nullable DoublesafeDivide(double b0, double b1) SQLSAFE_DIVIDEfunction applied to double values.static @Nullable DoublesafeDivide(double b0, long b1) SQLSAFE_DIVIDEfunction applied to double and long values.static @Nullable DoublesafeDivide(double b0, BigDecimal b1) SQLSAFE_DIVIDEfunction applied to double and BigDecimal values.static @Nullable DoublesafeDivide(long b0, double b1) SQLSAFE_DIVIDEfunction applied to long and double values.static @Nullable DoublesafeDivide(long b0, long b1) SQLSAFE_MULTIPLYfunction applied to long values.static @Nullable BigDecimalsafeDivide(long b0, BigDecimal b1) SQLSAFE_DIVIDEfunction applied to long and BigDecimal values.static @Nullable DoublesafeDivide(BigDecimal b0, double b1) SQLSAFE_DIVIDEfunction applied to BigDecimal and double values.static @Nullable BigDecimalsafeDivide(BigDecimal b0, long b1) SQLSAFE_DIVIDEfunction applied to BigDecimal and long values.static @Nullable BigDecimalsafeDivide(BigDecimal b0, BigDecimal b1) SQLSAFE_DIVIDEfunction applied to BigDecimal values.static @Nullable DoublesafeMultiply(double b0, double b1) SQLSAFE_MULTIPLYfunction applied to double values.static @Nullable DoublesafeMultiply(double b0, long b1) SQLSAFE_MULTIPLYfunction applied to double and long values.static @Nullable DoublesafeMultiply(double b0, BigDecimal b1) SQLSAFE_MULTIPLYfunction applied to double and BigDecimal values.static @Nullable DoublesafeMultiply(long b0, double b1) SQLSAFE_MULTIPLYfunction applied to long and double values.static @Nullable LongsafeMultiply(long b0, long b1) SQLSAFE_MULTIPLYfunction applied to long values.static @Nullable BigDecimalsafeMultiply(long b0, BigDecimal b1) SQLSAFE_MULTIPLYfunction applied to long and BigDecimal values.static @Nullable DoublesafeMultiply(BigDecimal b0, double b1) SQLSAFE_MULTIPLYfunction applied to BigDecimal and double values.static @Nullable BigDecimalsafeMultiply(BigDecimal b0, long b1) SQLSAFE_MULTIPLYfunction applied to BigDecimal and long values.static @Nullable BigDecimalsafeMultiply(BigDecimal b0, BigDecimal b1) SQLSAFE_MULTIPLYfunction applied to BigDecimal values.static @Nullable DoublesafeSubtract(double b0, double b1) SQLSAFE_SUBTRACTfunction applied to double values.static @Nullable DoublesafeSubtract(double b0, long b1) SQLSAFE_SUBTRACTfunction applied to double and long values.static @Nullable DoublesafeSubtract(double b0, BigDecimal b1) SQLSAFE_SUBTRACTfunction applied to double and BigDecimal values.static @Nullable DoublesafeSubtract(long b0, double b1) SQLSAFE_SUBTRACTfunction applied to long and double values.static @Nullable LongsafeSubtract(long b0, long b1) SQLSAFE_SUBTRACTfunction applied to long values.static @Nullable BigDecimalsafeSubtract(long b0, BigDecimal b1) SQLSAFE_SUBTRACTfunction applied to long and BigDecimal values.static @Nullable DoublesafeSubtract(BigDecimal b0, double b1) SQLSAFE_SUBTRACTfunction applied to BigDecimal and double values.static @Nullable BigDecimalsafeSubtract(BigDecimal b0, long b1) SQLSAFE_SUBTRACTfunction applied to BigDecimal and long values.static @Nullable BigDecimalsafeSubtract(BigDecimal b0, BigDecimal b1) SQLSAFE_SUBTRACTfunction applied to BigDecimal values.static doublesec(double b0) SQLSECoperator applied to double values.static doublesec(BigDecimal b0) SQLSECoperator applied to BigDecimal values.static doublesech(double b0) SQLSECHoperator applied to double values.static doublesech(BigDecimal b0) SQLSECHoperator applied to BigDecimal values.static longSupport theCURRENT VALUE OF sequenceoperator.static longsequenceNextValue(String key) Support theNEXT VALUE OF sequenceoperator.static StringSQL SHA1(string) function.static Stringsha1(org.apache.calcite.avatica.util.ByteString string) SQL SHA1(string) function for binary string.static StringSQL SHA256(string) function.static Stringsha256(org.apache.calcite.avatica.util.ByteString string) SQL SHA256(string) function for binary string.static StringSQL SHA512(string) function.static Stringsha512(org.apache.calcite.avatica.util.ByteString string) SQL SHA512(string) function for binary string.static doublesign(double b0) SQLSIGNoperator applied to double values.static intsign(int b0) SQLSIGNoperator applied to int values.static longsign(long b0) SQLSIGNoperator applied to long values.static BigDecimalsign(BigDecimal b0) SQLSIGNoperator applied to BigDecimal values.static doublesin(double b0) SQLSINoperator applied to double values.static doublesin(BigDecimal b0) SQLSINoperator applied to BigDecimal values.static doublesind(double b0) SQLSINDoperator applied to double values.static doublesind(BigDecimal b0) SQLSINDoperator applied to BigDecimal values.static doublesinh(double b) SQLSINHoperator applied to double values.static doublesinh(BigDecimal b) SQLSINHoperator applied to BigDecimal values.static ListSupport the SLICE function.static ListSupport the SORT_ARRAY function.static StringSQL SOUNDEX(string) function.static StringSQL SOUNDEX(string) function but return original s when not mapped.static Stringspace(int n) SQL SPACE(int) function.SQLSPLIT(string)function.SQLSPLIT(string, string)function.static List<org.apache.calcite.avatica.util.ByteString>split(org.apache.calcite.avatica.util.ByteString s, org.apache.calcite.avatica.util.ByteString delimiter) SQLSPLIT(binary, binary)function.static StringSQLSPLIT_PART(string, string, int)function.static doublesround(double b0) SQLROUNDoperator applied to double values.static doublesround(double b0, int b1) SQLROUNDoperator applied to double values.static intsround(int b0) SQLROUNDoperator applied to int values.static intsround(int b0, int b1) SQLROUNDoperator applied to int values.static longsround(long b0) SQLROUNDoperator applied to long values.static longsround(long b0, int b1) SQLROUNDoperator applied to long values.static BigDecimalsround(BigDecimal b0) SQLROUNDoperator applied to BigDecimal values.static BigDecimalsround(BigDecimal b0, int b1) SQLROUNDoperator applied to BigDecimal values.static booleanstartsWith(String s0, String s1) SQLSTARTS_WITH(string, string)function.static booleanstartsWith(org.apache.calcite.avatica.util.ByteString s0, org.apache.calcite.avatica.util.ByteString s1) SQLSTARTS_WITH(binary, binary)function.static intSQL STRCMP(String,String) function.stringToArray(String string, @Nullable String delimiter) SQLSTRING_TO_ARRAY(string, delimiter)function.stringToArray(String string, @Nullable String delimiter, @Nullable String nullString) SQLSTRING_TO_ARRAY(string, delimiter, nullString)function.static @PolyNull org.apache.calcite.avatica.util.ByteStringstringToBinary(@PolyNull String s, Charset charset) static MapSupport the STR_TO_MAP function.static @Nullable ObjectstructAccess(@Nullable Object structObject, int index, @Nullable String fieldName) Implements the.(field access) operator on an object whose type is not known until runtime.static doublestruncate(double b0) SQLTRUNCATEoperator applied to double values.static doublestruncate(double b0, int b1) static intstruncate(int b0) SQLTRUNCATEoperator applied to int values.static intstruncate(int b0, int b1) static longstruncate(long b0) SQLTRUNCATEoperator applied to long values.static longstruncate(long b0, int b1) static BigDecimalstruncate(BigDecimal b0) SQLTRUNCATEoperator applied to BigDecimal values.static BigDecimalstruncate(BigDecimal b0, int b1) static booleansubmultisetOf(Collection possibleSubMultiset, Collection multiset) Support the SUBMULTISET OF function.static StringSQL SUBSTRING(string FROM ...) function.static StringSQL SUBSTRING(string FROM ...static Stringstatic Stringstatic Stringstatic Stringstatic org.apache.calcite.avatica.util.ByteStringsubstring(org.apache.calcite.avatica.util.ByteString c, int s) SQL SUBSTRING(binary FROM ...) function for binary.static org.apache.calcite.avatica.util.ByteStringsubstring(org.apache.calcite.avatica.util.ByteString c, int s, int l) SQL SUBSTRING(binary FROM ...static StringsubstringIndex(String string, String delimiter, int count) Support the SUBSTRING_INDEX function.static intsysDate(DataContext root) SQLSYSDATEfunction.static StringsystemUser(DataContext root) SQLSYSTEM_USERfunction.static longsysTimestamp(DataContext root) SQLSYSTIMESTAMPfunction.static doubletan(double b0) SQLTANoperator applied to double values.static doubletan(BigDecimal b0) SQLTANoperator applied to BigDecimal values.static doubletand(double b0) SQLTANDoperator applied to double values.static doubletand(BigDecimal b0) SQLTANDoperator applied to BigDecimal values.static doubletanh(double b) SQLTANHoperator applied to double values.static doubletanh(BigDecimal b) SQLTANHoperator applied to BigDecimal values.static booleanthrowUnless(boolean condition, String message) Internal THROW_UNLESS(condition, message) function.static inttime(int hour, int minute, int second) SQLTIME(<hour>, <minute>, <second>)function.static inttime(long timestampMillis) SQLTIME(<timestamp>)andTIME(<timestampLtz>)functions.static intSQLTIME(<timestampLtz>, <timeZone>)function.static longtimestamp(int days) SQLTIMESTAMP(<date>)function.static longSQLTIMESTAMP(<date>, <timeZone>)function.static longtimestamp(long millisSinceEpoch) SQLTIMESTAMP(<timestamp>)function; returns a TIMESTAMP WITH LOCAL TIME ZONE.static longSQLTIMESTAMP(<timestamp>, <timeZone>)function; returns a TIMESTAMP WITH LOCAL TIME ZONE.static longSQLTIMESTAMP(<string>)function.static longSQLTIMESTAMP(<string>, <timeZone>)function.static longtimestampMicros(long v) static longtimestampMillis(long v) static longtimestampSeconds(long v) static inttimestampToDate(long timestamp) Converts a timestamp (milliseconds since epoch) to a date (days since epoch).static inttimestampToTime(long timestamp) Converts a timestamp (milliseconds since epoch) to a time (milliseconds since midnight).static inttimestampWithLocalTimeZoneToDate(long v, TimeZone timeZone) static StringtimestampWithLocalTimeZoneToString(long v, TimeZone timeZone) static inttimestampWithLocalTimeZoneToTime(long v, TimeZone timeZone) static longtimestampWithLocalTimeZoneToTimestamp(long v, TimeZone timeZone) static intstatic StringtimeWithLocalTimeZoneToString(int v, TimeZone timeZone) static inttimeWithLocalTimeZoneToTime(int v, TimeZone timeZone) static longtimeWithLocalTimeZoneToTimestamp(String date, int v, TimeZone timeZone) static longtimeWithLocalTimeZoneToTimestampWithLocalTimeZone(String date, int v) static TimeZonetimeZone(DataContext root) static StringSQL TO_BASE32(string) function.static StringtoBase32(org.apache.calcite.avatica.util.ByteString string) SQL TO_BASE32(string) function for binary string.static StringSQL TO_BASE64(string)/BASE64(string) function.static StringtoBase64(org.apache.calcite.avatica.util.ByteString string) SQL TO_BASE64(string)/BASE64(string) function for binary string.static BigDecimaltoBigDecimal(Number number) static BigDecimalstatic BigDecimalstatic booleanstatic booleanstatic booleanCAST(VARCHAR AS BOOLEAN).static bytestatic bytestatic charstatic CharacterSQL TO_CODE_POINTS(string) function.toCodePoints(org.apache.calcite.avatica.util.ByteString s) SQL TO_CODE_POINTS(string) function for binary string.static doublestatic doublestatic doublestatic floatstatic floatstatic floatstatic StringtoHex(org.apache.calcite.avatica.util.ByteString byteString) SQL TO_HEX(binary) function.static intstatic intstatic intstatic intConverts a SQL DATE value from the Java type (Date) to the internal representation type (number of days since January 1st, 1970 asint) in the local time zone.static intConverts a SQL DATE value from the Java type (Date) to the internal representation type (number of days since January 1st, 1970 asint).static intConverts a SQL TIME value from the Java type (Time) to the internal representation type (number of milliseconds since January 1st, 1970 asint) in the local time zone.static @PolyNull IntegertoIntOptional(@PolyNull Object o) static @PolyNull IntegertoIntOptional(@PolyNull Date v) static @PolyNull IntegertoIntOptional(@PolyNull Date v, TimeZone timeZone) static @PolyNull IntegertoIntOptional(@PolyNull Time v) static longstatic longstatic longstatic longConverts a SQL TIMESTAMP value from the Java type (Timestamp) to the internal representation type (number of milliseconds since January 1st, 1970 aslong).static longConverts a SQL TIMESTAMP value from the Java type (Timestamp) to the internal representation type (number of milliseconds since January 1st, 1970 aslong).static longConverts a SQL TIMESTAMP value from the Java type (Date) to the internal representation type (number of milliseconds since January 1st, 1970 aslong).static @PolyNull LongtoLongOptional(@PolyNull Object o) static @PolyNull LongtoLongOptional(@PolyNull Timestamp v) static @PolyNull LongtoLongOptional(@PolyNull Timestamp v, TimeZone timeZone) static shortstatic shortstatic shortstatic StringtoString(boolean x) CAST(BOOLEAN AS VARCHAR).static StringtoString(double x) CAST(DOUBLE AS VARCHAR).static StringtoString(float x) CAST(FLOAT AS VARCHAR).static StringCAST(DECIMAL AS VARCHAR).static @PolyNull LongtoTimestampWithLocalTimeZone(@PolyNull String v) static @PolyNull LongtoTimestampWithLocalTimeZone(@PolyNull String v, TimeZone timeZone) static @PolyNull IntegertoTimeWithLocalTimeZone(@PolyNull String v) static @PolyNull IntegertoTimeWithLocalTimeZone(@PolyNull String v, TimeZone timeZone) static <F,T> List<T> Transforms a list, applying a function to each element.static Stringtranslate3(String s, String search, String replacement) SQLTRANSLATE(string, search_chars, replacement_chars)function.static StringtranslateWithCharset(String s, String transcodingName) SQLTRANSLATE(s USING transcodingName)function, also known asCONVERT(s USING transcodingName).static StringSQLTRIM(... seek FROM s)function.static Stringstatic org.apache.calcite.avatica.util.ByteStringtrim(org.apache.calcite.avatica.util.ByteString s) SQLTRIMfunction applied to binary string.static inttruncate(int v, int x) Helper for rounding.static longtruncate(long v, long x) Helper for rounding.static @PolyNull StringHelper for CAST(...static @PolyNull org.apache.calcite.avatica.util.ByteStringtruncate(@PolyNull org.apache.calcite.avatica.util.ByteString s, int maxLength) Helper for CAST(...static @PolyNull StringtruncateOrPad(@PolyNull String s, int maxLength) Helper for CAST(...static @PolyNull org.apache.calcite.avatica.util.ByteStringtruncateOrPad(@PolyNull org.apache.calcite.avatica.util.ByteString s, int maxLength) Helper for CAST(...static intunixDate(int v) static longunixDateExtract(String rangeString, long date) static longunixDateExtract(org.apache.calcite.avatica.util.TimeUnitRange range, long date) static longunixMicros(long v) static longunixMillis(long v) static longunixSeconds(long v) static StringSQL UPPER(string) function.static Stringuser(DataContext root) SQLUSERfunction.static org.apache.calcite.avatica.util.ByteStringuuidToBinary(UUID uuid) static StringuuidToString(UUID uuid) 
- 
Method Details- 
throwUnlessInternal THROW_UNLESS(condition, message) function.The method is marked NonDeterministicto prevent the generator from storing its value as a constant.
- 
uuidToString
- 
binaryToUuid
- 
uuidToBinary
- 
toBase64SQL TO_BASE64(string)/BASE64(string) function.
- 
toBase64SQL TO_BASE64(string)/BASE64(string) function for binary string.
- 
fromBase64SQL FROM_BASE64(string)/UNBASE64(string) function.
- 
toBase32SQL TO_BASE32(string) function.
- 
toBase32SQL TO_BASE32(string) function for binary string.
- 
fromBase32SQL FROM_BASE32(string) function.
- 
fromHexSQL FROM_HEX(varchar) function.
- 
toHexSQL TO_HEX(binary) function.
- 
hexSQL HEX(varchar) function.
- 
binSQL BIN(long) function.
- 
crc32SQL CRC32(string) function.
- 
crc32public static long crc32(org.apache.calcite.avatica.util.ByteString value) SQL CRC32(string) function for binary string.
- 
md5SQL MD5(string) function.
- 
md5SQL MD5(string) function for binary string.
- 
sha1SQL SHA1(string) function.
- 
sha1SQL SHA1(string) function for binary string.
- 
sha256SQL SHA256(string) function.
- 
sha256SQL SHA256(string) function for binary string.
- 
sha512SQL SHA512(string) function.
- 
sha512SQL SHA512(string) function for binary string.
- 
lpadSQLLPAD(string, integer, string)function.
- 
lpadSQLLPAD(string, integer)function.
- 
lpadpublic static org.apache.calcite.avatica.util.ByteString lpad(org.apache.calcite.avatica.util.ByteString originalValue, int returnLength, org.apache.calcite.avatica.util.ByteString pattern) SQLLPAD(binary, integer, binary)function.
- 
lpadpublic static org.apache.calcite.avatica.util.ByteString lpad(org.apache.calcite.avatica.util.ByteString originalValue, int returnLength) SQLLPAD(binary, integer, binary)function.
- 
rpadSQLRPAD(string, integer, string)function.
- 
rpadSQLRPAD(string, integer)function.
- 
rpadpublic static org.apache.calcite.avatica.util.ByteString rpad(org.apache.calcite.avatica.util.ByteString originalValue, int returnLength, org.apache.calcite.avatica.util.ByteString pattern) SQLRPAD(binary, integer, binary)function.
- 
rpadpublic static org.apache.calcite.avatica.util.ByteString rpad(org.apache.calcite.avatica.util.ByteString originalValue, int returnLength) SQLRPAD(binary, integer)function.
- 
endsWithSQLENDS_WITH(string, string)function.
- 
endsWithpublic static boolean endsWith(org.apache.calcite.avatica.util.ByteString s0, org.apache.calcite.avatica.util.ByteString s1) SQLENDS_WITH(binary, binary)function.
- 
startsWithSQLSTARTS_WITH(string, string)function.
- 
startsWithpublic static boolean startsWith(org.apache.calcite.avatica.util.ByteString s0, org.apache.calcite.avatica.util.ByteString s1) SQLSTARTS_WITH(binary, binary)function.
- 
splitSQLSPLIT(string, string)function.
- 
splitPartSQLSPLIT_PART(string, string, int)function.
- 
splitSQLSPLIT(string)function.
- 
splitpublic static List<org.apache.calcite.avatica.util.ByteString> split(org.apache.calcite.avatica.util.ByteString s, org.apache.calcite.avatica.util.ByteString delimiter) SQLSPLIT(binary, binary)function.
- 
containsSubstrSQLCONTAINS_SUBSTR(rows, substr)operator.
- 
containsSubstrSQLCONTAINS_SUBSTR(arr, substr)operator.
- 
containsSubstrSQLCONTAINS_SUBSTR(jsonString, substr, json_scope=>jsonScope)operator.
- 
containsSubstrSQLCONTAINS_SUBSTR(expr, substr)operator.
- 
containsSubstrSQLCONTAINS_SUBSTR(boolean, substr)operator.
- 
containsSubstrSQLCONTAINS_SUBSTR(int, substr)operator.
- 
containsSubstrSQLCONTAINS_SUBSTR(long, substr)operator.
- 
substringSQL SUBSTRING(string FROM ...) function.
- 
substring
- 
substringSQL SUBSTRING(string FROM ... FOR ...) function.
- 
substring
- 
substring
- 
substring
- 
substringpublic static org.apache.calcite.avatica.util.ByteString substring(org.apache.calcite.avatica.util.ByteString c, int s) SQL SUBSTRING(binary FROM ...) function for binary.
- 
substringpublic static org.apache.calcite.avatica.util.ByteString substring(org.apache.calcite.avatica.util.ByteString c, int s, int l) SQL SUBSTRING(binary FROM ... FOR ...) function for binary.
- 
formatNumberSQL FORMAT_NUMBER(value, decimalOrFormat) function.
- 
formatNumber
- 
formatNumber
- 
formatNumber
- 
formatNumber
- 
formatNumber
- 
getFormatPattern
- 
upperSQL UPPER(string) function.
- 
lowerSQL LOWER(string) function.
- 
initcapSQL INITCAP(string) function.
- 
reverseSQL REVERSE(string) function.
- 
levenshteinSQL LEVENSHTEIN(string1, string2) function.
- 
findInSetSQL FIND_IN_SET(matchStr, textStr) function. Returns the index (1-based) of the given matchStr in the comma-delimited list textStr. Returns 0, if the matchStr is not found or if the matchStr contains a comma.
- 
asciiSQL ASCII(string) function.
- 
repeatSQL REPEAT(string, int) function.
- 
spaceSQL SPACE(int) function.
- 
strcmpSQL STRCMP(String,String) function.
- 
soundexSQL SOUNDEX(string) function.
- 
soundexSparkSQL SOUNDEX(string) function but return original s when not mapped.
- 
differenceSQL DIFFERENCE(string, string) function.
- 
leftSQL LEFT(string, integer) function.
- 
leftpublic static org.apache.calcite.avatica.util.ByteString left(org.apache.calcite.avatica.util.ByteString s, int n) SQL LEFT(ByteString, integer) function.
- 
rightSQL RIGHT(string, integer) function.
- 
rightpublic static org.apache.calcite.avatica.util.ByteString right(org.apache.calcite.avatica.util.ByteString s, int n) SQL RIGHT(ByteString, integer) function.
- 
charFromAsciiSQL CHAR(integer) function, as in MySQL and Spark.Returns the ASCII character of nmodulo 256, or null ifn< 0.
- 
charFromUtf8SQL CHR(integer) function, as in Oracle and Postgres.Returns the UTF-8 character whose code is n.
- 
codePointsToBytespublic static @Nullable org.apache.calcite.avatica.util.ByteString codePointsToBytes(List codePoints) SQL CODE_POINTS_TO_BYTES(list) function.
- 
codePointsToStringSQL CODE_POINTS_TO_STRING(list) function.
- 
toCodePointsSQL TO_CODE_POINTS(string) function.
- 
toCodePointsSQL TO_CODE_POINTS(string) function for binary string.
- 
octetLengthpublic static int octetLength(org.apache.calcite.avatica.util.ByteString s) SQL OCTET_LENGTH(binary) function.
- 
charLengthSQL CHARACTER_LENGTH(string) function.
- 
bitLengthSQL BIT_LENGTH(string) function.
- 
bitLengthpublic static int bitLength(org.apache.calcite.avatica.util.ByteString s) SQL BIT_LENGTH(binary) function.
- 
bitGetpublic static byte bitGet(long value, int position) SQL BIT_GET(value, position) function.
- 
bitGetpublic static byte bitGet(int value, int position) SQL BIT_GET(value, position) function.
- 
bitGetpublic static byte bitGet(short value, int position) SQL BIT_GET(value, position) function.
- 
bitGetpublic static byte bitGet(byte value, int position) SQL BIT_GET(value, position) function.
- 
concatSQLstring || stringoperator.
- 
concatWithNullConcatenates two strings. Returns null only when both s0 and s1 are null, otherwise null is treated as empty string.
- 
concatpublic static org.apache.calcite.avatica.util.ByteString concat(org.apache.calcite.avatica.util.ByteString s0, org.apache.calcite.avatica.util.ByteString s1) SQLbinary || binaryoperator.
- 
concatMultiSQLCONCAT(arg0, arg1, arg2, ...)function.
- 
concatMultiWithNullSQLCONCAT(arg0, ...)function which can accept null but never return null. Always treats null as empty string.
- 
concatMultiWithSeparatorSQLCONCAT_WS(sep, arg1, arg2, ...)function; treats null arguments as empty strings.
- 
concatMultiTypeWithSeparatorSQLCONCAT_WS(sep[, str | array(str)]+)function, return null for null sep.
- 
concatMultiObjectWithSeparatorSQLCONCAT_WS(sep[, any]+)function, return null for null sep.
- 
convertWithCharsetSQLCONVERT(s, src_charset, dest_charset)function.
- 
translateWithCharsetSQLTRANSLATE(s USING transcodingName)function, also known asCONVERT(s USING transcodingName).
- 
convertOracleOracle'sCONVERT(charValue, destCharsetName[, srcCharsetName])function, return null if s is null or empty.
- 
rtrimSQLRTRIMfunction applied to string.
- 
ltrimSQLLTRIMfunction.
- 
trimSQLTRIM(... seek FROM s)function.
- 
trim
- 
trimpublic static org.apache.calcite.avatica.util.ByteString trim(org.apache.calcite.avatica.util.ByteString s) SQLTRIMfunction applied to binary string.
- 
rtrimpublic static org.apache.calcite.avatica.util.ByteString rtrim(org.apache.calcite.avatica.util.ByteString s) Helper for CAST.
- 
overlaySQLOVERLAYfunction.
- 
overlaySQLOVERLAYfunction.
- 
overlaypublic static org.apache.calcite.avatica.util.ByteString overlay(org.apache.calcite.avatica.util.ByteString s, org.apache.calcite.avatica.util.ByteString r, int start) SQLOVERLAYfunction applied to binary strings.
- 
overlaypublic 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) SQLOVERLAYfunction applied to binary strings.
- 
eqSQL=operator applied to BigDecimal values (neither may be null).
- 
eqSQL=operator applied to Object[] values (neither may be null).
- 
eqSQL=operator applied to Object values (including String; neither side may be null).
- 
eqSQL=operator applied to String values with a certain Comparator.
- 
eqAnySQL=operator applied to Object values (at least one operand has ANY type; neither may be null).
- 
neSQL<gt;operator applied to BigDecimal values.
- 
neSQL<gt;operator applied to Object values (including String; neither side may be null).
- 
neSQL<gt;operator applied to OString values with a certain Comparator.
- 
neAnySQL<gt;operator applied to Object values (at least one operand has ANY type, including String; neither may be null).
- 
ltpublic static boolean lt(boolean b0, boolean b1) SQL<operator applied to boolean values.
- 
ltSQL<operator applied to String values.
- 
ltSQL<operator applied to String values.
- 
ltpublic static boolean lt(org.apache.calcite.avatica.util.ByteString b0, org.apache.calcite.avatica.util.ByteString b1) SQL<operator applied to ByteString values.
- 
ltSQL<operator applied to BigDecimal values.
- 
ltNullableReturns whetherb0is less thanb1(orb1is null). Helper forARG_MIN.
- 
ltpublic static boolean lt(byte b0, byte b1) 
- 
ltpublic static boolean lt(char b0, char b1) 
- 
ltpublic static boolean lt(short b0, short b1) 
- 
ltpublic static boolean lt(int b0, int b1) 
- 
ltpublic static boolean lt(long b0, long b1) 
- 
ltpublic static boolean lt(float b0, float b1) 
- 
ltpublic static boolean lt(double b0, double b1) 
- 
lt
- 
lt
- 
ltAnySQL<operator applied to Object values.
- 
lepublic static boolean le(boolean b0, boolean b1) SQL≤operator applied to boolean values.
- 
leSQL≤operator applied to String values.
- 
leSQL≤operator applied to String values.
- 
lepublic static boolean le(org.apache.calcite.avatica.util.ByteString b0, org.apache.calcite.avatica.util.ByteString b1) SQL≤operator applied to ByteString values.
- 
leSQL≤operator applied to BigDecimal values.
- 
leSQL≤operator applied to List values.
- 
leSQL≤operator applied to Object[] values.
- 
leAnySQL≤operator applied to Object values (at least one operand has ANY type; neither may be null).
- 
gtpublic static boolean gt(boolean b0, boolean b1) SQL>operator applied to boolean values.
- 
gtSQL>operator applied to String values.
- 
gtSQL>operator applied to String values.
- 
gtpublic static boolean gt(org.apache.calcite.avatica.util.ByteString b0, org.apache.calcite.avatica.util.ByteString b1) SQL>operator applied to ByteString values.
- 
gtSQL>operator applied to BigDecimal values.
- 
gtNullableReturns whetherb0is greater thanb1(orb1is null). Helper forARG_MAX.
- 
gtpublic static boolean gt(byte b0, byte b1) 
- 
gtpublic static boolean gt(char b0, char b1) 
- 
gtpublic static boolean gt(short b0, short b1) 
- 
gtpublic static boolean gt(int b0, int b1) 
- 
gtpublic static boolean gt(long b0, long b1) 
- 
gtpublic static boolean gt(float b0, float b1) 
- 
gtpublic static boolean gt(double b0, double b1) 
- 
gt
- 
gt
- 
gtAnySQL>operator applied to Object values (at least one operand has ANY type; neither may be null).
- 
gepublic static boolean ge(boolean b0, boolean b1) SQL≥operator applied to boolean values.
- 
geSQL≥operator applied to String values.
- 
geSQL≥operator applied to String values.
- 
gepublic static boolean ge(org.apache.calcite.avatica.util.ByteString b0, org.apache.calcite.avatica.util.ByteString b1) SQL≥operator applied to ByteString values.
- 
geSQL≥operator applied to BigDecimal values.
- 
geSQL≥operator applied to List values.
- 
geSQL≥operator applied to Object[] values.
- 
geAnySQL≥operator applied to Object values (at least one operand has ANY type; neither may be null).
- 
pluspublic static int plus(int b0, int b1) SQL+operator applied to int values.
- 
plusSQL+operator applied to int values; left side may be null.
- 
plusSQL+operator applied to int values; right side may be null.
- 
plusSQL+operator applied to nullable int values.
- 
plusSQL+operator applied to nullable long and int values.
- 
plusSQL+operator applied to nullable int and long values.
- 
plusSQL+operator applied to BigDecimal values.
- 
plusAnySQL+operator applied to Object values (at least one operand has ANY type; either may be null).
- 
checkedPluspublic static byte checkedPlus(byte b0, byte b1) 
- 
checkedPluspublic static short checkedPlus(short b0, short b1) 
- 
checkedPluspublic static int checkedPlus(int b0, int b1) 
- 
checkedPluspublic static long checkedPlus(long b0, long b1) 
- 
minuspublic static int minus(int b0, int b1) SQL-operator applied to int values.
- 
minusSQL-operator applied to int values; left side may be null.
- 
minusSQL-operator applied to int values; right side may be null.
- 
minusSQL-operator applied to nullable int values.
- 
minusSQL-operator applied to nullable long and int values.
- 
minusSQL-operator applied to nullable int and long values.
- 
minusSQL-operator applied to nullable BigDecimal values.
- 
minusAnySQL-operator applied to Object values (at least one operand has ANY type; either may be null).
- 
checkedMinuspublic static byte checkedMinus(byte b0, byte b1) 
- 
checkedMinuspublic static short checkedMinus(short b0, short b1) 
- 
checkedMinuspublic static int checkedMinus(int b0, int b1) 
- 
checkedMinuspublic static long checkedMinus(long b0, long b1) 
- 
checkedUnaryMinuspublic static byte checkedUnaryMinus(byte b) 
- 
checkedUnaryMinuspublic static short checkedUnaryMinus(short b) 
- 
checkedUnaryMinuspublic static int checkedUnaryMinus(int b) 
- 
checkedUnaryMinuspublic static long checkedUnaryMinus(long b) 
- 
dividepublic static int divide(int b0, int b1) SQL/operator applied to int values.
- 
divideSQL/operator applied to int values; left side may be null.
- 
divideSQL/operator applied to int values; right side may be null.
- 
divideSQL/operator applied to nullable int values.
- 
divideSQL/operator applied to nullable long and int values.
- 
divideSQL/operator applied to nullable int and long values.
- 
divideSQL/operator applied to BigDecimal values.
- 
divideAnySQL/operator applied to Object values (at least one operand has ANY type; either may be null).
- 
divide
- 
divide
- 
checkedDividepublic static byte checkedDivide(byte b0, byte b1) 
- 
checkedDividepublic static short checkedDivide(short b0, short b1) 
- 
checkedDividepublic static int checkedDivide(int b0, int b1) 
- 
checkedDividepublic static long checkedDivide(long b0, long b1) 
- 
multiplypublic static int multiply(int b0, int b1) SQL*operator applied to int values.
- 
multiplySQL*operator applied to int values; left side may be null.
- 
multiplySQL*operator applied to int values; right side may be null.
- 
multiplySQL*operator applied to nullable int values.
- 
multiplySQL*operator applied to nullable long and int values.
- 
multiplySQL*operator applied to nullable int and long values.
- 
multiplySQL*operator applied to nullable BigDecimal values.
- 
multiplyAnySQL*operator applied to Object values (at least one operand has ANY type; either may be null).
- 
checkedMultiplypublic static byte checkedMultiply(byte b0, byte b1) 
- 
checkedMultiplypublic static short checkedMultiply(short b0, short b1) 
- 
checkedMultiplypublic static int checkedMultiply(int b0, int b1) 
- 
checkedMultiplypublic static long checkedMultiply(long b0, long b1) 
- 
safeAddSQLSAFE_ADDfunction applied to long values.
- 
safeAddSQLSAFE_ADDfunction applied to long and BigDecimal values.
- 
safeAddSQLSAFE_ADDfunction applied to BigDecimal and long values.
- 
safeAddSQLSAFE_ADDfunction applied to BigDecimal values.
- 
safeAddSQLSAFE_ADDfunction applied to double and long values.
- 
safeAddSQLSAFE_ADDfunction applied to long and double values.
- 
safeAddSQLSAFE_ADDfunction applied to double and BigDecimal values.
- 
safeAddSQLSAFE_ADDfunction applied to BigDecimal and double values.
- 
safeAddSQLSAFE_ADDfunction applied to double values.
- 
safeDivideSQLSAFE_MULTIPLYfunction applied to long values.
- 
safeDivideSQLSAFE_DIVIDEfunction applied to long and BigDecimal values.
- 
safeDivideSQLSAFE_DIVIDEfunction applied to BigDecimal and long values.
- 
safeDivideSQLSAFE_DIVIDEfunction applied to BigDecimal values.
- 
safeDivideSQLSAFE_DIVIDEfunction applied to double and long values.
- 
safeDivideSQLSAFE_DIVIDEfunction applied to long and double values.
- 
safeDivideSQLSAFE_DIVIDEfunction applied to double and BigDecimal values.
- 
safeDivideSQLSAFE_DIVIDEfunction applied to BigDecimal and double values.
- 
safeDivideSQLSAFE_DIVIDEfunction applied to double values.
- 
safeMultiplySQLSAFE_MULTIPLYfunction applied to long values.
- 
safeMultiplySQLSAFE_MULTIPLYfunction applied to long and BigDecimal values.
- 
safeMultiplySQLSAFE_MULTIPLYfunction applied to BigDecimal and long values.
- 
safeMultiplySQLSAFE_MULTIPLYfunction applied to BigDecimal values.
- 
safeMultiplySQLSAFE_MULTIPLYfunction applied to double and long values.
- 
safeMultiplySQLSAFE_MULTIPLYfunction applied to long and double values.
- 
safeMultiplySQLSAFE_MULTIPLYfunction applied to double and BigDecimal values.
- 
safeMultiplySQLSAFE_MULTIPLYfunction applied to BigDecimal and double values.
- 
safeMultiplySQLSAFE_MULTIPLYfunction applied to double values.
- 
safeSubtractSQLSAFE_SUBTRACTfunction applied to long values.
- 
safeSubtractSQLSAFE_SUBTRACTfunction applied to long and BigDecimal values.
- 
safeSubtractSQLSAFE_SUBTRACTfunction applied to BigDecimal and long values.
- 
safeSubtractSQLSAFE_SUBTRACTfunction applied to BigDecimal values.
- 
safeSubtractSQLSAFE_SUBTRACTfunction applied to double and long values.
- 
safeSubtractSQLSAFE_SUBTRACTfunction applied to long and double values.
- 
safeSubtractSQLSAFE_SUBTRACTfunction applied to double and BigDecimal values.
- 
safeSubtractSQLSAFE_SUBTRACTfunction applied to BigDecimal and double values.
- 
safeSubtractSQLSAFE_SUBTRACTfunction applied to double values.
- 
bitAndpublic static long bitAnd(long b0, long b1) Bitwise functionBIT_ANDapplied to integer values.
- 
bitAndBitwise functionBITANDapplied to a Long and int value. Needed for handling NULL for the first argument.
- 
bitAndBitwise functionBITANDapplied to a Long and int value. Needed for handling NULL for the second argument.
- 
bitAndpublic static org.apache.calcite.avatica.util.ByteString bitAnd(org.apache.calcite.avatica.util.ByteString b0, org.apache.calcite.avatica.util.ByteString b1) Bitwise functionBIT_ANDapplied to binary values.
- 
bitCountpublic static long bitCount(long b) Helper function for implementingBITCOUNT. Counts the number of bits set in an integer value.
- 
bitCountHelper function for implementingBITCOUNT. Counts the number of bits set in the integer portion of a decimal value.
- 
bitCountpublic static long bitCount(org.apache.calcite.avatica.util.ByteString b) Helper function for implementingBITCOUNT. Counts the number of bits set in a ByteString value.
- 
bitCountMySQLHelper function for implementing MySQLBIT_COUNT. Counts the number of bits set in a boolean value.
- 
bitCountMySQLHelper function for implementing MySQLBIT_COUNT. Counts the number of bits set in a string value.
- 
bitCountMySQLHelper function for implementing MySQLBIT_COUNT. Counts the number of bits set in a number value.
- 
bitCountMySQLHelper function for implementing MySQLBIT_COUNT. Counts the number of bits set in a date value.
- 
bitCountMySQLHelper function for implementing MySQLBIT_COUNT. Counts the number of bits set in a time value.
- 
bitCountMySQLHelper function for implementing MySQLBIT_COUNT. Counts the number of bits set in a timestamp value.
- 
bitOrpublic static long bitOr(long b0, long b1) Bitwise functionBIT_ORapplied to integer values.
- 
bitOrBitwise functionBITORapplied to a Long and int value. Needed for handling NULL for the first argument.
- 
bitOrBitwise functionBITORapplied to a Long and int value. Needed for handling NULL for the second argument.
- 
bitOrpublic static org.apache.calcite.avatica.util.ByteString bitOr(org.apache.calcite.avatica.util.ByteString b0, org.apache.calcite.avatica.util.ByteString b1) Bitwise functionBIT_ORapplied to binary values.
- 
bitXorpublic static long bitXor(long b0, long b1) Bitwise functionBIT_XORapplied to integer values.
- 
bitXorBitwise functionBITXORapplied to a Long and int value. Needed for handling NULL for the first argument.
- 
bitXorBitwise functionBITXORapplied to a Long and int value. Needed for handling NULL for the second argument.
- 
bitXorpublic static org.apache.calcite.avatica.util.ByteString bitXor(org.apache.calcite.avatica.util.ByteString b0, org.apache.calcite.avatica.util.ByteString b1) Bitwise functionBIT_XORapplied to binary values.
- 
bitNotpublic static long bitNot(long b) Bitwise functionBIT_NOTapplied to integer values.
- 
bitNotpublic static org.apache.calcite.avatica.util.ByteString bitNot(org.apache.calcite.avatica.util.ByteString b) Bitwise functionBIT_NOTapplied to a binary value.
- 
exppublic static double exp(double b0) SQLEXPoperator applied to double values.
- 
exp
- 
powerpublic static double power(double b0, double b1) SQLPOWERoperator applied to double values.
- 
power
- 
power
- 
power
- 
logSQLLOG(number, base)function applied to double values.- Parameters:
- nonPositiveIsNull- if true return null for non-positive values
 
- 
logSQLLOG(number, base)function applied to double and BigDecimal values.- Parameters:
- nonPositiveIsNull- if true return null for non-positive values
 
- 
logSQLLOG(number, base)function applied to BigDecimal and double values.- Parameters:
- nonPositiveIsNull- if true return null for non-positive values
 
- 
logSQLLOG(number, base)function applied to double values.- Parameters:
- nonPositiveIsNull- if true return null for non-positive values
 
- 
log1pSQLLOG1Poperator applied to double values.
- 
log1pSQLLOG1Poperator applied to BigDecimal values.
- 
modpublic static byte mod(byte b0, byte b1) SQLMODoperator applied to byte values.
- 
modpublic static short mod(short b0, short b1) SQLMODoperator applied to short values.
- 
modpublic static int mod(int b0, int b1) SQLMODoperator applied to int values.
- 
modpublic static long mod(long b0, long b1) SQLMODoperator applied to long values.
- 
mod
- 
mod
- 
mod
- 
floorpublic static double floor(double b0) 
- 
floorpublic static float floor(float b0) 
- 
floor
- 
floorpublic static byte floor(byte b0, byte b1) SQLFLOORoperator applied to byte values.
- 
floorpublic static short floor(short b0, short b1) SQLFLOORoperator applied to short values.
- 
floorpublic static int floor(int b0, int b1) SQLFLOORoperator applied to int values.
- 
floorpublic static long floor(long b0, long b1) SQLFLOORoperator applied to long values.
- 
floor
- 
floor
- 
floor
- 
ceilpublic static double ceil(double b0) 
- 
ceilpublic static float ceil(float b0) 
- 
ceil
- 
ceilpublic static byte ceil(byte b0, byte b1) SQLCEILoperator applied to byte values.
- 
ceilpublic static short ceil(short b0, short b1) SQLCEILoperator applied to short values.
- 
ceilpublic static int ceil(int b0, int b1) SQLCEILoperator applied to int values.
- 
ceilpublic static long ceil(long b0, long b1) SQLCEILoperator applied to long values.
- 
ceil
- 
ceil
- 
ceil
- 
abspublic static byte abs(byte b0) SQLABSoperator applied to byte values.
- 
abspublic static short abs(short b0) SQLABSoperator applied to short values.
- 
abspublic static int abs(int b0) SQLABSoperator applied to int values.
- 
abspublic static long abs(long b0) SQLABSoperator applied to long values.
- 
abspublic static float abs(float b0) SQLABSoperator applied to float values.
- 
abspublic static double abs(double b0) SQLABSoperator applied to double values.
- 
absSQLABSoperator applied to BigDecimal values.
- 
acosSQLACOSoperator applied to BigDecimal values.
- 
acospublic static double acos(double b0) SQLACOSoperator applied to double values.
- 
acosdSQLACOSDoperator applied to BigDecimal values.
- 
acosdpublic static double acosd(double b0) SQLACOSDoperator applied to double values.
- 
acoshSQLACOSHoperator applied to BigDecimal values.
- 
acoshpublic static double acosh(double b0) SQLACOSHoperator applied to double values.
- 
asinSQLASINoperator applied to BigDecimal values.
- 
asinpublic static double asin(double b0) SQLASINoperator applied to double values.
- 
asindSQLASINDoperator applied to BigDecimal values.
- 
asindpublic static double asind(double b0) SQLASINDoperator applied to double values.
- 
asinhSQLASINHoperator applied to BigDecimal values.
- 
asinhpublic static double asinh(double b0) SQLASINHoperator applied to double values.
- 
atanSQLATANoperator applied to BigDecimal values.
- 
atanpublic static double atan(double b0) SQLATANoperator applied to double values.
- 
atandSQLATANoperator applied to BigDecimal values.
- 
atandpublic static double atand(double b0) SQLATANDoperator applied to double values.
- 
atan2SQLATAN2operator applied to double/BigDecimal values.
- 
atan2SQLATAN2operator applied to BigDecimal/double values.
- 
atan2SQLATAN2operator applied to BigDecimal values.
- 
atan2public static double atan2(double b0, double b1) SQLATAN2operator applied to double values.
- 
atanhSQLATANHoperator applied to BigDecimal values.
- 
atanhpublic static double atanh(double b) SQLATANHoperator applied to double values.
- 
cbrtSQLCBRToperator applied to BigDecimal values.
- 
cbrtpublic static double cbrt(double b) SQLCBRToperator applied to double values.
- 
cosSQLCOSoperator applied to BigDecimal values.
- 
cospublic static double cos(double b0) SQLCOSoperator applied to double values.
- 
cosdSQLCOSDoperator applied to BigDecimal values.
- 
cosdpublic static double cosd(double b0) SQLCOSDoperator applied to double values.
- 
coshSQLCOSHoperator applied to BigDecimal values.
- 
coshpublic static double cosh(double b) SQLCOSHoperator applied to double values.
- 
cotSQLCOToperator applied to BigDecimal values.
- 
cotpublic static double cot(double b0) SQLCOToperator applied to double values.
- 
cothSQLCOTHoperator applied to BigDecimal values.
- 
cothpublic static double coth(double b0) SQLCOTHoperator applied to double values.
- 
cschSQLCSCHoperator applied to BigDecimal values.
- 
cschpublic static double csch(double b0) SQLCSCHoperator applied to double values.
- 
degreesSQLDEGREESoperator applied to BigDecimal values.
- 
degreespublic static double degrees(double b0) SQLDEGREESoperator applied to double values.
- 
factorialSQLFACTORIALoperator.
- 
isInfSQLIS_INFoperator applied to BigDecimal values.
- 
isInfpublic static boolean isInf(double b0) SQLIS_INFoperator applied to double values.
- 
isInfpublic static boolean isInf(float b0) SQLIS_INFoperator applied to float values.
- 
isNaNSQLIS_NANoperator applied to BigDecimal values.
- 
isNaNpublic static boolean isNaN(double b0) SQLIS_NANoperator applied to double values.
- 
isNaNpublic static boolean isNaN(float b0) SQLIS_NANoperator applied to float values.
- 
radiansSQLRADIANSoperator applied to BigDecimal values.
- 
radianspublic static double radians(double b0) SQLRADIANSoperator applied to double values.
- 
sechSQLSECHoperator applied to BigDecimal values.
- 
sechpublic static double sech(double b0) SQLSECHoperator applied to double values.
- 
sroundpublic static int sround(int b0) SQLROUNDoperator applied to int values.
- 
sroundpublic static int sround(int b0, int b1) SQLROUNDoperator applied to int values.
- 
sroundpublic static long sround(long b0) SQLROUNDoperator applied to long values.
- 
sroundpublic static long sround(long b0, int b1) SQLROUNDoperator applied to long values.
- 
sroundSQLROUNDoperator applied to BigDecimal values.
- 
sroundSQLROUNDoperator applied to BigDecimal values.
- 
sroundpublic static double sround(double b0) SQLROUNDoperator applied to double values.
- 
sroundpublic static double sround(double b0, int b1) SQLROUNDoperator applied to double values.
- 
struncatepublic static int struncate(int b0) SQLTRUNCATEoperator applied to int values.
- 
struncatepublic static int struncate(int b0, int b1) 
- 
struncatepublic static long struncate(long b0) SQLTRUNCATEoperator applied to long values.
- 
struncatepublic static long struncate(long b0, int b1) 
- 
struncateSQLTRUNCATEoperator applied to BigDecimal values.
- 
struncate
- 
struncatepublic static double struncate(double b0) SQLTRUNCATEoperator applied to double values.
- 
struncatepublic static double struncate(double b0, int b1) 
- 
signpublic static int sign(int b0) SQLSIGNoperator applied to int values.
- 
signpublic static long sign(long b0) SQLSIGNoperator applied to long values.
- 
signSQLSIGNoperator applied to BigDecimal values.
- 
signpublic static double sign(double b0) SQLSIGNoperator applied to double values.
- 
sinSQLSINoperator applied to BigDecimal values.
- 
sinpublic static double sin(double b0) SQLSINoperator applied to double values.
- 
sindSQLSINDoperator applied to BigDecimal values.
- 
sindpublic static double sind(double b0) SQLSINDoperator applied to double values.
- 
sinhSQLSINHoperator applied to BigDecimal values.
- 
sinhpublic static double sinh(double b) SQLSINHoperator applied to double values.
- 
tanSQLTANoperator applied to BigDecimal values.
- 
tanpublic static double tan(double b0) SQLTANoperator applied to double values.
- 
tandSQLTANDoperator applied to BigDecimal values.
- 
tandpublic static double tand(double b0) SQLTANDoperator applied to double values.
- 
tanhSQLTANHoperator applied to BigDecimal values.
- 
tanhpublic static double tanh(double b) SQLTANHoperator applied to double values.
- 
cscSQLCSCoperator applied to BigDecimal values.
- 
cscpublic static double csc(double b0) SQLCSCoperator applied to double values.
- 
secSQLSECoperator applied to BigDecimal values.
- 
secpublic static double sec(double b0) SQLSECoperator applied to double values.
- 
lesserHelper for implementing MIN. Somewhat similar to LEAST operator.
- 
leastLEAST operator.
- 
greaterpublic static boolean greater(boolean b0, boolean b1) 
- 
lesserpublic static boolean lesser(boolean b0, boolean b1) 
- 
greaterpublic static byte greater(byte b0, byte b1) 
- 
lesserpublic static byte lesser(byte b0, byte b1) 
- 
greaterpublic static char greater(char b0, char b1) 
- 
lesserpublic static char lesser(char b0, char b1) 
- 
greaterpublic static short greater(short b0, short b1) 
- 
lesserpublic static short lesser(short b0, short b1) 
- 
greaterpublic static int greater(int b0, int b1) 
- 
lesserpublic static int lesser(int b0, int b1) 
- 
greaterpublic static long greater(long b0, long b1) 
- 
lesserpublic static long lesser(long b0, long b1) 
- 
greaterpublic static float greater(float b0, float b1) 
- 
lesserpublic static float lesser(float b0, float b1) 
- 
greaterpublic static double greater(double b0, double b1) 
- 
lesserpublic static double lesser(double b0, double b1) 
- 
lesserpublic static <T extends Comparable<T>> @Nullable List<T> lesser(@Nullable List<T> b0, @Nullable List<T> b1) 
- 
greaterpublic static <T extends Comparable<T>> @Nullable List<T> greater(@Nullable List<T> b0, @Nullable List<T> b1) 
- 
greaterHelper for implementing MAX. Somewhat similar to GREATEST operator.
- 
greatestGREATEST operator.
- 
toStringCAST(FLOAT AS VARCHAR).
- 
toStringCAST(DOUBLE AS VARCHAR).
- 
toStringCAST(DECIMAL AS VARCHAR).
- 
toStringCAST(BOOLEAN AS VARCHAR).
- 
toBooleanCAST(VARCHAR AS BOOLEAN).
- 
toBoolean
- 
toBoolean
- 
toByte
- 
toByte
- 
toChar
- 
toCharBoxed
- 
toShort
- 
toShort
- 
toShort
- 
toIntConverts a SQL DATE value from the Java type (Date) to the internal representation type (number of days since January 1st, 1970 asint) in the local time zone.Since a time zone is not available, the date is converted to represent the same date as a Unix date in UTC as the Datevalue in the local time zone.
- 
toIntConverts a SQL DATE value from the Java type (Date) to the internal representation type (number of days since January 1st, 1970 asint).The Dateclass uses the standard Gregorian calendar which switches from the Julian calendar to the Gregorian calendar in October 1582. For compatibility with ISO-8601, the internal representation is converted to use the proleptic Gregorian calendar.If the date contains a partial day, it will be rounded to a full day depending on the milliseconds value. If the milliseconds value is positive, it will be rounded down to the closest full day. If the milliseconds value is negative, it will be rounded up to the closest full day. 
- 
toIntOptionalConverts a nullable SQL DATE value from the Java type (Date) to the internal representation type (number of days since January 1st, 1970 asInteger) in the local time zone.Since a time zone is not available, the date is converted to represent the same date as a Unix date in UTC as the Datevalue in the local time zone.
- 
toIntOptionalConverts a nullable SQL DATE value from the Java type (Date) to the internal representation type (number of days since January 1st, 1970 asInteger).- See Also:
 
- 
toIntConverts a SQL TIME value from the Java type (Time) to the internal representation type (number of milliseconds since January 1st, 1970 asint) in the local time zone.- See Also:
 
- 
toIntOptionalConverts a nullable SQL TIME value from the Java type (Time) to the internal representation type (number of milliseconds since January 1st, 1970 asInteger).- See Also:
 
- 
toInt
- 
toInt
- 
toInt
- 
toIntOptional
- 
toLongConverts a SQL TIMESTAMP value from the Java type (Date) to the internal representation type (number of milliseconds since January 1st, 1970 aslong).Since a time zone is not available, converts the timestamp to represent the same date and time as a Unix timestamp in UTC as the Datevalue in the local time zone.The Dateclass uses the standard Gregorian calendar which switches from the Julian calendar to the Gregorian calendar in October 1582. For compatibility with ISO-8601, converts the internal representation to use the proleptic Gregorian calendar.
- 
toLongConverts a SQL TIMESTAMP value from the Java type (Timestamp) to the internal representation type (number of milliseconds since January 1st, 1970 aslong).Since a time zone is not available, converts the timestamp to represent the same date and time as a Unix timestamp in UTC as the Timestampvalue in the local time zone.- See Also:
 
- 
toLongConverts a SQL TIMESTAMP value from the Java type (Timestamp) to the internal representation type (number of milliseconds since January 1st, 1970 aslong).For backwards compatibility, time zone offsets are calculated in relation to the local time zone instead of UTC. Providing the default time zone or nullwill return the timestamp unmodified.The Timestampclass uses the standard Gregorian calendar which switches from the Julian calendar to the Gregorian calendar in October 1582. For compatibility with ISO-8601, the internal representation is converted to use the proleptic Gregorian calendar.
- 
toLongOptionalConverts a nullable SQL TIMESTAMP value from the Java type (Timestamp) to the internal representation type (number of milliseconds since January 1st, 1970 asLong) in the local time zone.- See Also:
 
- 
toLongOptionalConverts a nullable SQL TIMESTAMP value from the Java type (Timestamp) to the internal representation type (number of milliseconds since January 1st, 1970 asLong).- See Also:
 
- 
toLong
- 
toLong
- 
toLong
- 
toLongOptional
- 
toFloat
- 
toFloat
- 
toFloat
- 
toDouble
- 
toDouble
- 
toDouble
- 
toBigDecimal
- 
toBigDecimal
- 
toBigDecimal
- 
internalToDateConverts a SQL DATE value from the internal representation type (number of days since January 1st, 1970) to the Java type (Date).Since a time zone is not available, converts the date to represent the same date as a Datein the local time zone as the Unix date in UTC.The Unix date should be the number of days since January 1st, 1970 using the proleptic Gregorian calendar as defined by ISO-8601. The returned Dateobject will use the standard Gregorian calendar which switches from the Julian calendar to the Gregorian calendar in October 1582.- See Also:
 
- 
internalToDateConverts a nullable SQL DATE value from the internal representation type (number of days since January 1st, 1970) to the Java type (Date).- See Also:
 
- 
internalToTimeConverts a SQL TIME value from the internal representation type (number of milliseconds since January 1st, 1970) to the Java type (Time).- See Also:
 
- 
internalToTimeConverts a nullable SQL TIME value from the internal representation type (number of milliseconds since January 1st, 1970) to the Java type (Time).- See Also:
 
- 
toTimeWithLocalTimeZone
- 
toTimeWithLocalTimeZone
- 
timeWithLocalTimeZoneToTime
- 
timeWithLocalTimeZoneToTimestamp
- 
timeWithLocalTimeZoneToTimestampWithLocalTimeZone
- 
timeWithLocalTimeZoneToString
- 
unixDateExtractpublic static long unixDateExtract(org.apache.calcite.avatica.util.TimeUnitRange range, long date) 
- 
unixDateExtract
- 
internalToTimestampConverts a SQL TIMESTAMP value from the internal representation type (number of milliseconds since January 1st, 1970) to the Java Type (Timestamp) in the local time zone.Since a time zone is not available, the timestamp is converted to represent the same timestamp as a Timestampin the local time zone as the Unix timestamp in UTC.The Unix timestamp should be the number of milliseconds since January 1st, 1970 using the proleptic Gregorian calendar as defined by ISO-8601. The returned Timestampobject will use the standard Gregorian calendar which switches from the Julian calendar to the Gregorian calendar in October 1582.
- 
internalToTimestampConverts a nullable SQL TIMESTAMP value from the internal representation type (number of milliseconds since January 1st, 1970) to the Java Type (Timestamp) in the local time zone.
- 
timestampWithLocalTimeZoneToDate
- 
timestampWithLocalTimeZoneToTime
- 
timestampWithLocalTimeZoneToTimestamp
- 
timestampWithLocalTimeZoneToString
- 
timestampWithLocalTimeZoneToTimeWithLocalTimeZonepublic static int timestampWithLocalTimeZoneToTimeWithLocalTimeZone(long v) 
- 
timestampSecondspublic static long timestampSeconds(long v) 
- 
timestampMillispublic static long timestampMillis(long v) 
- 
timestampMicrospublic static long timestampMicros(long v) 
- 
unixSecondspublic static long unixSeconds(long v) 
- 
unixMillispublic static long unixMillis(long v) 
- 
unixMicrospublic static long unixMicros(long v) 
- 
dateFromUnixDatepublic static int dateFromUnixDate(int v) 
- 
unixDatepublic static int unixDate(int v) 
- 
datepublic static int date(int year, int month, int day) SQLDATE(year, month, day)function.
- 
datepublic static int date(long timestampMillis) SQLDATE(TIMESTAMP)andDATE(TIMESTAMP WITH LOCAL TIME ZONE)functions.
- 
dateSQLDATE(TIMESTAMP WITH LOCAL TIME, timeZone)function.
- 
datetimepublic static long datetime(int year, int month, int day, int hour, int minute, int second) SQLDATETIME(<year>, <month>, <day>, <hour>, <minute>, <second>)function.
- 
datetimepublic static long datetime(int daysSinceEpoch) SQLDATETIME(DATE)function; returns a Calcite TIMESTAMP.
- 
datetimepublic static long datetime(int daysSinceEpoch, int millisSinceMidnight) SQLDATETIME(DATE, TIME)function; returns a Calcite TIMESTAMP.
- 
datetimepublic static long datetime(long millisSinceEpoch) SQLDATETIME(TIMESTAMP WITH LOCAL TIME ZONE)function; returns a Calcite TIMESTAMP.
- 
datetimeSQLDATETIME(TIMESTAMP, timeZone)function; returns a Calcite TIMESTAMP.
- 
timestampSQLTIMESTAMP(<string>)function.
- 
timestampSQLTIMESTAMP(<string>, <timeZone>)function.
- 
timestamppublic static long timestamp(int days) SQLTIMESTAMP(<date>)function.
- 
timestampSQLTIMESTAMP(<date>, <timeZone>)function.
- 
timestamppublic static long timestamp(long millisSinceEpoch) SQLTIMESTAMP(<timestamp>)function; returns a TIMESTAMP WITH LOCAL TIME ZONE.
- 
timestampSQLTIMESTAMP(<timestamp>, <timeZone>)function; returns a TIMESTAMP WITH LOCAL TIME ZONE.
- 
timepublic static int time(int hour, int minute, int second) SQLTIME(<hour>, <minute>, <second>)function.
- 
timepublic static int time(long timestampMillis) SQLTIME(<timestamp>)andTIME(<timestampLtz>)functions.
- 
timeSQLTIME(<timestampLtz>, <timeZone>)function.
- 
toTimestampWithLocalTimeZone
- 
toTimestampWithLocalTimeZone
- 
truncateHelper for CAST(... AS VARCHAR(maxLength)).
- 
truncateOrPadHelper for CAST(... AS CHAR(maxLength)).
- 
stringToBinary
- 
truncatepublic static @PolyNull org.apache.calcite.avatica.util.ByteString truncate(@PolyNull org.apache.calcite.avatica.util.ByteString s, int maxLength) Helper for CAST(... AS VARBINARY(maxLength)).
- 
truncateOrPadpublic static @PolyNull org.apache.calcite.avatica.util.ByteString truncateOrPad(@PolyNull org.apache.calcite.avatica.util.ByteString s, int maxLength) Helper for CAST(... AS BINARY(maxLength)).
- 
positionSQLPOSITION(seek IN string)function.
- 
positionpublic static int position(org.apache.calcite.avatica.util.ByteString seek, org.apache.calcite.avatica.util.ByteString s) SQLPOSITION(seek IN string)function for byte strings.
- 
positionSQLPOSITION(seek IN string FROM integer)function.
- 
positionpublic static int position(org.apache.calcite.avatica.util.ByteString seek, org.apache.calcite.avatica.util.ByteString s, int from) SQLPOSITION(seek IN string FROM integer)function for byte strings.
- 
positionSQLPOSITION(seek, string, from, occurrence)function.
- 
positionpublic static int position(org.apache.calcite.avatica.util.ByteString seek, org.apache.calcite.avatica.util.ByteString s, int from, int occurrence) SQLPOSITION(seek, string, from, occurrence)function for byte strings.
- 
roundpublic static long round(long v, long x) Helper for rounding. Truncate(12345, 1000) returns 12000.
- 
truncatepublic static long truncate(long v, long x) Helper for rounding. Truncate(12345, 1000) returns 12000.
- 
roundpublic static int round(int v, int x) Helper for rounding. Truncate(12345, 1000) returns 12000.
- 
truncatepublic static int truncate(int v, int x) Helper for rounding. Truncate(12345, 1000) returns 12000.
- 
dayNameWithTimestampSQLDAYNAMEfunction, applied to a TIMESTAMP argument.- Parameters:
- timestamp- Milliseconds from epoch
- locale- Locale
- Returns:
- Name of the weekday in the given locale
 
- 
dayNameWithDateSQLDAYNAMEfunction, applied to a DATE argument.- Parameters:
- date- Days since epoch
- locale- Locale
- Returns:
- Name of the weekday in the given locale
 
- 
monthNameWithTimestampSQLMONTHNAMEfunction, applied to a TIMESTAMP argument.- Parameters:
- timestamp- Milliseconds from epoch
- locale- Locale
- Returns:
- Name of the month in the given locale
 
- 
monthNameWithDateSQLMONTHNAMEfunction, applied to a DATE argument.- Parameters:
- date- Days from epoch
- locale- Locale
- Returns:
- Name of the month in the given locale
 
- 
timestampToDatepublic static int timestampToDate(long timestamp) Converts a timestamp (milliseconds since epoch) to a date (days since epoch).
- 
timestampToTimepublic static int timestampToTime(long timestamp) Converts a timestamp (milliseconds since epoch) to a time (milliseconds since midnight).
- 
currentTimestampSQLCURRENT_TIMESTAMPfunction.
- 
currentTimeSQLCURRENT_TIMEfunction.
- 
currentDateSQLCURRENT_DATEfunction.
- 
currentDatetimeSQLCURRENT_DATETIMEfunction.
- 
currentDatetimeSQLCURRENT_DATETIMEfunction with a specified timezone.
- 
localTimestampSQLLOCAL_TIMESTAMPfunction.
- 
localTimeSQLLOCAL_TIMEfunction.
- 
sysTimestampSQLSYSTIMESTAMPfunction.
- 
sysDateSQLSYSDATEfunction.When the date is before 1970-01-01 00:00:00, for example: 1969-12-31 23:59:59, the timestamp will return a negative value, such as -1000. The date(days since epoch) returned by timestampToDate(-1000) is 0, so we need to additionally judge the result of timestampToTime(-1000). If its value is less than 0, we need to reduce date by 1 to ensure the accuracy of date. 
- 
timeZone
- 
userSQLUSERfunction.
- 
systemUserSQLSYSTEM_USERfunction.
- 
locale
- 
customDateAddSQLDATEADDfunction applied to a custom time frame.Custom time frames are created as part of a TimeFrameSet. This method retrieves the session's time frame set from theDataContext.Variable.TIME_FRAME_SETvariable, then looks up the time frame by name.
- 
customTimestampAddpublic static long customTimestampAdd(DataContext root, String timeFrameName, long interval, long timestamp) SQLTIMESTAMPADDfunction applied to a custom time frame.Custom time frames are created and accessed as described in customDateAdd(org.apache.calcite.DataContext, java.lang.String, int, int).
- 
customDateDiffSQLDATEDIFFfunction applied to a custom time frame.Custom time frames are created and accessed as described in customDateAdd(org.apache.calcite.DataContext, java.lang.String, int, int).
- 
customTimestampDiffpublic static long customTimestampDiff(DataContext root, String timeFrameName, long timestamp, long timestamp2) SQLTIMESTAMPDIFFfunction applied to a custom time frame.Custom time frames are created and accessed as described in customDateAdd(org.apache.calcite.DataContext, java.lang.String, int, int).
- 
customDateFloorSQLFLOORfunction applied to aDATEvalue and a custom time frame.Custom time frames are created and accessed as described in customDateAdd(org.apache.calcite.DataContext, java.lang.String, int, int).
- 
customDateCeilSQLCEILfunction applied to aDATEvalue and a custom time frame.Custom time frames are created and accessed as described in customDateAdd(org.apache.calcite.DataContext, java.lang.String, int, int).
- 
customTimestampFloorSQLFLOORfunction applied to aTIMESTAMPvalue and a custom time frame.Custom time frames are created and accessed as described in customDateAdd(org.apache.calcite.DataContext, java.lang.String, int, int).
- 
customTimestampCeilSQLCEILfunction applied to aTIMESTAMPvalue and a custom time frame.Custom time frames are created and accessed as described in customDateAdd(org.apache.calcite.DataContext, java.lang.String, int, int).
- 
translate3SQLTRANSLATE(string, search_chars, replacement_chars)function.
- 
replaceSQLREPLACE(string, search, replacement)function.
- 
arrayItemHelper for "array element reference". Caller has already ensured that array and index are not null.Index may be 0- or 1-based depending on which array subscript operator is being used. ITEM,ORDINAL, andSAFE_ORDINALare 1-based, whileOFFSETandSAFE_OFFSETare 0-based.The ITEM,SAFE_OFFSET, andSAFE_ORDINALoperators return null if the index is out of bounds, while the others throw an error.
- 
mapItemHelper for "map element reference". Caller has already ensured that array and index are not null. Index is 1-based, per SQL.
- 
itemImplements the[ ... ]operator on an object whose type is not known until runtime.
- 
arrayItemOptionalpublic static @Nullable Object arrayItemOptional(@Nullable List list, int item, int offset, boolean safe) AsarrayItem(java.util.List, int, int, boolean)method, but allows array to be nullable.
- 
mapItemOptionalAsmapItem(java.util.Map, java.lang.Object)method, but allows map to be nullable.
- 
itemOptionalAsitem(java.lang.Object, java.lang.Object)method, but allows object to be nullable.
- 
isTrueNULL → FALSE, FALSE → FALSE, TRUE → TRUE.
- 
isFalseNULL → FALSE, FALSE → TRUE, TRUE → FALSE.
- 
isNotTrueNULL → TRUE, FALSE → TRUE, TRUE → FALSE.
- 
isNotFalseNULL → TRUE, FALSE → FALSE, TRUE → TRUE.
- 
notNULL → NULL, FALSE → TRUE, TRUE → FALSE.
- 
arrayToListConverts a JDBC array to a list.
- 
sequenceCurrentValueSupport theCURRENT VALUE OF sequenceoperator.
- 
sequenceNextValueSupport theNEXT VALUE OF sequenceoperator.
- 
arraysOverlapSupport the ARRAYS_OVERLAP function.
- 
arraysZipSupport the ARRAYS_ZIP function.
- 
compactSupport the ARRAY_COMPACT function.
- 
arrayAppendSupport the ARRAY_APPEND function.
- 
distinctSupport the ARRAY_DISTINCT function.Note: If the list does not contain null, Util.distinctList(List)is probably faster.
- 
arrayMaxpublic static <T extends Object & Comparable<? super T>> @Nullable T arrayMax(List<? extends T> list) Support the ARRAY_MAX function.
- 
arrayMinpublic static <T extends Object & Comparable<? super T>> @Nullable T arrayMin(List<? extends T> list) Support the ARRAY_MIN function.
- 
arrayPrependSupport the ARRAY_PREPEND function.
- 
arrayPositionSupport the ARRAY_POSITION function.
- 
arrayRemoveSupport the ARRAY_REMOVE function.
- 
arrayRepeatSupport the ARRAY_REPEAT function.
- 
arrayExceptSupport the ARRAY_EXCEPT function.
- 
arrayInsertSupport the ARRAY_INSERT function.
- 
arrayIntersectSupport the ARRAY_INTERSECT function.
- 
arrayUnionSupport the ARRAY_UNION function.
- 
transformpublic static <F,T> List<T> transform(List<? extends F> list, Function1<? super F, ? extends T> function) Transforms a list, applying a function to each element.
- 
sortArraySupport the SORT_ARRAY function.
- 
existsSupport the EXISTS(list, function1) function.
- 
existsSupport the EXISTS(list, predicate1) function.
- 
mapConcatSupport the MAP_CONCAT function.
- 
mapEntriesSupport the MAP_ENTRIES function.
- 
mapKeysSupport the MAP_KEYS function.
- 
mapValuesSupport the MAP_VALUES function.
- 
mapContainsKeySupport the MAP_CONTAINS_KEY function.
- 
mapFromArraysSupport the MAP_FROM_ARRAYS function.
- 
mapFromEntriesSupport the MAP_FROM_ENTRIES function.
- 
mapSupport the MAP function.odd-indexed elements are keys and even-indexed elements are values. 
- 
strToMapSupport the STR_TO_MAP function.
- 
substringIndexSupport the SUBSTRING_INDEX function.
- 
sliceSupport the SLICE function.
- 
elementSupport the ELEMENT function.
- 
memberOfSupport the MEMBER OF function.
- 
multisetIntersectDistinctSupport the MULTISET INTERSECT DISTINCT function.
- 
multisetIntersectAllSupport the MULTISET INTERSECT ALL function.
- 
multisetExceptAllSupport the MULTISET EXCEPT ALL function.
- 
multisetExceptDistinctSupport the MULTISET EXCEPT DISTINCT function.
- 
isASetSupport the IS A SET function.
- 
submultisetOfSupport the SUBMULTISET OF function.
- 
multisetUnionDistinctSupport the MULTISET UNION function.
- 
multisetUnionAllSupport the MULTISET UNION ALL function.
- 
reverseSupport the ARRAY_REVERSE function.
- 
arraySliceSQLARRAY_SLICE(array, start, length)function.
- 
arrayToStringSQLARRAY_TO_STRING(array, delimiter)function.
- 
arrayToStringSQLARRAY_TO_STRING(array, delimiter, nullText)function.
- 
stringToArraySQLSTRING_TO_ARRAY(string, delimiter)function. Returns a one-dimensional string[] array by splitting the input string value into subvalues using the specified string value as the "delimiter". Optionally, allows a specified string value to be interpreted as NULL.
- 
stringToArraypublic static List<@Nullable String> stringToArray(String string, @Nullable String delimiter, @Nullable String nullString) SQLSTRING_TO_ARRAY(string, delimiter, nullString)function.
- 
flatListFunction 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.
- 
flatProductpublic static Function1<Object,Enumerable<FlatLists.ComparableList<Comparable>>> flatProduct(int[] fieldCounts, boolean withOrdinality, SqlFunctions.FlatProductInputType[] inputTypes) 
- 
array
- 
nullableExistspublic static <E> @Nullable Boolean nullableExists(List<? extends E> list, Function1<E, Boolean> predicate) Returns whether there is an element inlistfor whichpredicateis true. Also, ifpredicatereturns null for any element oflistand does not returntruefor any element oflist, the result will benull, notfalse.
- 
nullableAllpublic static <E> @Nullable Boolean nullableAll(List<? extends E> list, Function1<E, Boolean> predicate) Returns whetherpredicateis true for all elements oflist. Also, ifpredicatereturns null for any element oflistand does not returnfalsefor any element, the result will benull, nottrue.
- 
productpublic static <E extends Comparable> Enumerable<FlatLists.ComparableList<E>> product(List<Enumerator<List<E>>> enumerators, int fieldCount, boolean withOrdinality) Similar toLinq4j.product(Iterable)but each resulting list implementsFlatLists.ComparableList.
- 
structAccesspublic 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.A struct object can be represented in various ways by the runtime and depends on the JavaRowFormat.
 
-