Package org.apache.flink.table.functions
Interface SqlCallSyntax
-
@Internal public interface SqlCallSyntax
Provides a format for unparsingBuiltInFunctionDefinitions
into a SQL string.
-
-
Field Summary
Fields Modifier and Type Field Description static SqlCallSyntax
AS
Special sql syntax for AS.static SqlCallSyntax
BINARY_OP
Binary operator syntax, as in "x + y".static SqlCallSyntax
CAST
Special sql syntax for CAST operators (CAST, TRY_CAST, REINTERPRET_CAST).static SqlCallSyntax
COLLECTION_CTOR
Function syntax for collection ctors, such as ARRAY[1, 2, 3] or MAP['a', 1, 'b', 2].static SqlCallSyntax
DISTINCT
Function syntax for handling DISTINCT aggregates.static SqlCallSyntax
FLOOR_OR_CEIL
Special sql syntax for FLOOR and CEIL.static SqlCallSyntax
FUNCTION
Function syntax, as in "Foo(x, y)".static SqlCallSyntax
IN
Call syntax forBuiltInFunctionDefinitions.IN
.static SqlCallSyntax
LIKE
Special sql syntax for LIKE.static SqlCallSyntax
MULTIPLE_BINARY_OP
Binary operator syntax that in Table API can accept multiple operands, as in "x AND y AND t AND w".static SqlCallSyntax
OVERLAY
Special sql syntax for OVERLAY.static SqlCallSyntax
SUBSTRING
Special sql syntax for SUBSTRING operators (SUBSTRING, SUBSTR).static SqlCallSyntax
TRIM
Special sql syntax for TRIM.static SqlCallSyntax
UNARY_PREFIX_OP
Prefix unary operator syntax, as in "- x".static SqlCallSyntax
UNARY_SUFFIX_OP
Postfix unary operator syntax, as in "x ++".static SqlCallSyntax
WINDOW_START_END
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description String
unparse(String sqlName, List<ResolvedExpression> operands)
default String
unparseDistinct(String sqlName, List<ResolvedExpression> operands)
Special case for aggregate functions, which can have a DISTINCT function applied.
-
-
-
Field Detail
-
FUNCTION
static final SqlCallSyntax FUNCTION
Function syntax, as in "Foo(x, y)".
-
DISTINCT
static final SqlCallSyntax DISTINCT
Function syntax for handling DISTINCT aggregates. Special case. It does not have a syntax itself, but modifies the syntax of the nested call.
-
COLLECTION_CTOR
static final SqlCallSyntax COLLECTION_CTOR
Function syntax for collection ctors, such as ARRAY[1, 2, 3] or MAP['a', 1, 'b', 2].
-
BINARY_OP
static final SqlCallSyntax BINARY_OP
Binary operator syntax, as in "x + y".
-
MULTIPLE_BINARY_OP
static final SqlCallSyntax MULTIPLE_BINARY_OP
Binary operator syntax that in Table API can accept multiple operands, as in "x AND y AND t AND w".
-
UNARY_SUFFIX_OP
static final SqlCallSyntax UNARY_SUFFIX_OP
Postfix unary operator syntax, as in "x ++".
-
UNARY_PREFIX_OP
static final SqlCallSyntax UNARY_PREFIX_OP
Prefix unary operator syntax, as in "- x".
-
CAST
static final SqlCallSyntax CAST
Special sql syntax for CAST operators (CAST, TRY_CAST, REINTERPRET_CAST).Example: CAST(123 AS STRING)
-
SUBSTRING
static final SqlCallSyntax SUBSTRING
Special sql syntax for SUBSTRING operators (SUBSTRING, SUBSTR).Example: SUBSTR('abc' FROM 'abcdef' FOR 3)
-
FLOOR_OR_CEIL
static final SqlCallSyntax FLOOR_OR_CEIL
Special sql syntax for FLOOR and CEIL.Examples:
- FLOOR(TIME ‘12:44:31’ TO MINUTE)
- FLOOR(123)
-
TRIM
static final SqlCallSyntax TRIM
Special sql syntax for TRIM.Example: TRIM BOTH ' ' FROM 0;
-
OVERLAY
static final SqlCallSyntax OVERLAY
Special sql syntax for OVERLAY.Example: OVERLAY('abcd' PLACING 'def' FROM 3 FOR 2)
-
AS
static final SqlCallSyntax AS
Special sql syntax for AS. The string literal is formatted as an identifier.
-
IN
static final SqlCallSyntax IN
Call syntax forBuiltInFunctionDefinitions.IN
.
-
WINDOW_START_END
static final SqlCallSyntax WINDOW_START_END
-
LIKE
static final SqlCallSyntax LIKE
Special sql syntax for LIKE.Example: 'TE_ST' LIKE '%E&_S%' ESCAPE '&';
-
-
Method Detail
-
unparse
String unparse(String sqlName, List<ResolvedExpression> operands)
-
unparseDistinct
default String unparseDistinct(String sqlName, List<ResolvedExpression> operands)
Special case for aggregate functions, which can have a DISTINCT function applied. Called only from the DISTINCT function.
-
-