Package org.apache.calcite.sql.fun
Enum SqlLibrary
- All Implemented Interfaces:
Serializable
,Comparable<SqlLibrary>
,Constable
A library is a collection of SQL functions and operators.
Typically, such collections are associated with a particular dialect or
database. For example, ORACLE
is a collection of functions
that are in the Oracle database but not the SQL standard.
In SqlLibraryOperatorTableFactory
this annotation is applied to
function definitions to include them in a particular library. It allows
an operator to belong to more than one library.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA collection of operators that could be used in all libraries; does not include STANDARD and SPATIAL.A collection of operators that are in Google BigQuery but not in standard SQL.Calcite-specific extensions.A collection of operators that are in Apache Hive but not in standard SQL.A collection of operators that are in Microsoft SQL Server (MSSql) but not in standard SQL.A collection of operators that are in MySQL but not in standard SQL.A collection of operators that are in Oracle but not in standard SQL.A collection of operators that are in PostgreSQL but not in standard SQL.A collection of operators that are in Redshift but not in standard SQL or PostgreSQL.A collection of operators that are in Snowflake but not in standard SQL.A collection of operators that are in Apache Spark but not in standard SQL.Geospatial operators.The standard operators. -
Field Summary
Modifier and TypeFieldDescriptionfinal String
Abbreviation for the library used in SQL reference.final String
Name of this library when it appears in the connect string; seeCalciteConnectionProperty.FUN
.static final Map<String,
SqlLibrary> final @Nullable SqlLibrary
The current library will by default inherit functions from parent. -
Method Summary
Modifier and TypeMethodDescriptionchildren()
static List<SqlLibrary>
expand
(Iterable<? extends SqlLibrary> libraries) Expands libraries in place.static List<SqlLibrary>
expandUp
(Iterable<? extends SqlLibrary> libraries) Expands libraries in place.Returns the libraries that inherit this library's functions, because theirparent
field points to this.static @Nullable SqlLibrary
Looks up a value.static List<SqlLibrary>
Parses a comma-separated string such as "standard,oracle".static SqlLibrary
Returns the enum constant of this type with the specified name.static SqlLibrary[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
STANDARD
The standard operators. -
SPATIAL
Geospatial operators. -
ALL
A collection of operators that could be used in all libraries; does not include STANDARD and SPATIAL. -
BIG_QUERY
A collection of operators that are in Google BigQuery but not in standard SQL. -
CALCITE
Calcite-specific extensions. -
HIVE
A collection of operators that are in Apache Hive but not in standard SQL. -
MSSQL
A collection of operators that are in Microsoft SQL Server (MSSql) but not in standard SQL. -
MYSQL
A collection of operators that are in MySQL but not in standard SQL. -
ORACLE
A collection of operators that are in Oracle but not in standard SQL. -
POSTGRESQL
A collection of operators that are in PostgreSQL but not in standard SQL. -
REDSHIFT
A collection of operators that are in Redshift but not in standard SQL or PostgreSQL. -
SNOWFLAKE
A collection of operators that are in Snowflake but not in standard SQL. -
SPARK
A collection of operators that are in Apache Spark but not in standard SQL.
-
-
Field Details
-
MAP
-
abbrev
Abbreviation for the library used in SQL reference. -
fun
Name of this library when it appears in the connect string; seeCalciteConnectionProperty.FUN
. -
parent
The current library will by default inherit functions from parent.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
children
-
inheritors
Returns the libraries that inherit this library's functions, because theirparent
field points to this.For example,
REDSHIFT
inherits fromPOSTGRESQL
. Never returns null. -
of
Looks up a value. Returns null if not found. You can use upper- or lower-case name. -
parse
Parses a comma-separated string such as "standard,oracle". -
expand
Expands libraries in place.Preserves order, and ensures that no library occurs more than once.
-
expandUp
Expands libraries in place. If any library is a child of 'all', ensures that 'all' is in the list.
-