public class SqlDelegatingConformance extends SqlAbstractConformance
SqlConformance that delegates all methods to
another object. You can create a sub-class that overrides particular
methods.DEFAULT, ORACLE_10, PRAGMATIC_2003, PRAGMATIC_99, STRICT_2003, STRICT_92, STRICT_99| Modifier | Constructor and Description |
|---|---|
protected |
SqlDelegatingConformance(SqlConformance delegate)
Creates a SqlDelegatingConformance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowAliasUnnestItems()
Whether directly alias array items in UNNEST.
|
boolean |
allowNiladicParentheses()
Whether to allow parentheses to be specified in calls to niladic functions
and procedures (that is, functions and procedures with no parameters).
|
boolean |
isBangEqualAllowed()
Whether the bang-equal token != is allowed as an alternative to <> in
the parser.
|
boolean |
isFromRequired()
Whether
FROM clause is required in a SELECT statement. |
boolean |
isGroupByAlias()
Whether to allow aliases from the
SELECT clause to be used as
column names in the GROUP BY clause. |
boolean |
isGroupByOrdinal()
Whether
GROUP BY 2 is interpreted to mean 'group by the 2nd column
in the select list'. |
boolean |
isHavingAlias()
Whether to allow aliases from the
SELECT clause to be used as
column names in the HAVING clause. |
boolean |
isInsertSubsetColumnsAllowed()
Whether to allow
INSERT (or UPSERT) with no column list
but fewer values than the target table. |
boolean |
isMinusAllowed()
Whether
MINUS is allowed as an alternative to EXCEPT in
the parser. |
boolean |
isSortByAlias()
Whether '
ORDER BY x' is interpreted to mean 'sort by the select
list item whose alias is x' even if there is a column called x. |
boolean |
isSortByAliasObscures()
Whether "empno" is invalid in "select empno as x from emp order by empno"
because the alias "x" obscures it.
|
boolean |
isSortByOrdinal()
Whether '
ORDER BY 2' is interpreted to mean 'sort by the 2nd
column in the select list'. |
SqlLibrary |
semantics()
Controls the behavior of operators that are part of Standard SQL but
nevertheless have different behavior in different databases.
|
allowCharLiteralAlias, allowExplicitRowValueConstructor, allowExtend, allowExtendedTrim, allowGeometry, allowHyphenInUnquotedTableName, allowPluralTimeUnits, allowQualifyingCommonColumn, isApplyAllowed, isLiberal, isLimitStartCountAllowed, isOffsetLimitAllowed, isPercentRemainderAllowed, shouldConvertRaggedUnionTypesToVarying, splitQuotedTableNameprotected SqlDelegatingConformance(SqlConformance delegate)
public boolean isGroupByAlias()
SqlConformanceSELECT clause to be used as
column names in the GROUP BY clause.
Among the built-in conformance levels, true in
SqlConformanceEnum.BABEL,
SqlConformanceEnum.BIG_QUERY,
SqlConformanceEnum.LENIENT,
SqlConformanceEnum.MYSQL_5;
false otherwise.
isGroupByAlias in interface SqlConformanceisGroupByAlias in class SqlAbstractConformancepublic boolean isGroupByOrdinal()
SqlConformanceGROUP BY 2 is interpreted to mean 'group by the 2nd column
in the select list'.
Among the built-in conformance levels, true in
SqlConformanceEnum.BABEL,
SqlConformanceEnum.BIG_QUERY,
SqlConformanceEnum.LENIENT,
SqlConformanceEnum.MYSQL_5,
SqlConformanceEnum.PRESTO;
false otherwise.
isGroupByOrdinal in interface SqlConformanceisGroupByOrdinal in class SqlAbstractConformancepublic boolean isHavingAlias()
SqlConformanceSELECT clause to be used as
column names in the HAVING clause.
Among the built-in conformance levels, true in
SqlConformanceEnum.BABEL,
SqlConformanceEnum.BIG_QUERY,
SqlConformanceEnum.LENIENT,
SqlConformanceEnum.MYSQL_5;
false otherwise.
isHavingAlias in interface SqlConformanceisHavingAlias in class SqlAbstractConformancepublic boolean isSortByOrdinal()
SqlConformanceORDER BY 2' is interpreted to mean 'sort by the 2nd
column in the select list'.
Among the built-in conformance levels, true in
SqlConformanceEnum.DEFAULT,
SqlConformanceEnum.BABEL,
SqlConformanceEnum.LENIENT,
SqlConformanceEnum.MYSQL_5,
SqlConformanceEnum.ORACLE_10,
SqlConformanceEnum.ORACLE_12,
SqlConformanceEnum.PRAGMATIC_99,
SqlConformanceEnum.PRAGMATIC_2003,
SqlConformanceEnum.PRESTO,
SqlConformanceEnum.SQL_SERVER_2008,
SqlConformanceEnum.STRICT_92;
false otherwise.
isSortByOrdinal in interface SqlConformanceisSortByOrdinal in class SqlAbstractConformancepublic boolean isSortByAlias()
SqlConformanceORDER BY x' is interpreted to mean 'sort by the select
list item whose alias is x' even if there is a column called x.
Among the built-in conformance levels, true in
SqlConformanceEnum.DEFAULT,
SqlConformanceEnum.BABEL,
SqlConformanceEnum.BIG_QUERY,
SqlConformanceEnum.LENIENT,
SqlConformanceEnum.MYSQL_5,
SqlConformanceEnum.ORACLE_10,
SqlConformanceEnum.ORACLE_12,
SqlConformanceEnum.SQL_SERVER_2008,
SqlConformanceEnum.STRICT_92;
false otherwise.
isSortByAlias in interface SqlConformanceisSortByAlias in class SqlAbstractConformancepublic boolean isSortByAliasObscures()
SqlConformanceAmong the built-in conformance levels, true in
SqlConformanceEnum.STRICT_92;
false otherwise.
isSortByAliasObscures in interface SqlConformanceisSortByAliasObscures in class SqlAbstractConformancepublic boolean isFromRequired()
SqlConformanceFROM clause is required in a SELECT statement.
Among the built-in conformance levels, true in
SqlConformanceEnum.ORACLE_10,
SqlConformanceEnum.ORACLE_12,
SqlConformanceEnum.STRICT_92,
SqlConformanceEnum.STRICT_99,
SqlConformanceEnum.STRICT_2003;
false otherwise.
isFromRequired in interface SqlConformanceisFromRequired in class SqlAbstractConformancepublic boolean isBangEqualAllowed()
SqlConformanceAmong the built-in conformance levels, true in
SqlConformanceEnum.BABEL,
SqlConformanceEnum.LENIENT,
SqlConformanceEnum.MYSQL_5,
SqlConformanceEnum.ORACLE_10,
SqlConformanceEnum.ORACLE_12,
SqlConformanceEnum.PRESTO;
false otherwise.
isBangEqualAllowed in interface SqlConformanceisBangEqualAllowed in class SqlAbstractConformancepublic boolean isMinusAllowed()
SqlConformanceMINUS is allowed as an alternative to EXCEPT in
the parser.
Among the built-in conformance levels, true in
SqlConformanceEnum.BABEL,
SqlConformanceEnum.LENIENT,
SqlConformanceEnum.ORACLE_10,
SqlConformanceEnum.ORACLE_12;
false otherwise.
Note: MySQL does not support MINUS or EXCEPT (as of
version 5.5).
isMinusAllowed in interface SqlConformanceisMinusAllowed in class SqlAbstractConformancepublic boolean isInsertSubsetColumnsAllowed()
SqlConformanceINSERT (or UPSERT) with no column list
but fewer values than the target table.
The N values provided are assumed to match the first N columns of the table, and for each of the remaining columns, the default value of the column is used. It is an error if any of these columns has no default value.
The default value of a column is specified by the DEFAULT
clause in the CREATE TABLE statement, or is NULL if the
column is not declared NOT NULL.
Among the built-in conformance levels, true in
SqlConformanceEnum.BABEL,
SqlConformanceEnum.LENIENT,
SqlConformanceEnum.PRAGMATIC_99,
SqlConformanceEnum.PRAGMATIC_2003;
false otherwise.
isInsertSubsetColumnsAllowed in interface SqlConformanceisInsertSubsetColumnsAllowed in class SqlAbstractConformancepublic boolean allowNiladicParentheses()
SqlConformanceFor example, CURRENT_DATE is a niladic system function. In
standard SQL it must be invoked without parentheses:
VALUES CURRENT_DATE
If allowNiladicParentheses, the following syntax is also valid:
VALUES CURRENT_DATE()
Of the popular databases, MySQL, Apache Phoenix and VoltDB allow this behavior; Apache Hive, HSQLDB, IBM DB2, Microsoft SQL Server, Oracle, PostgreSQL do not.
Among the built-in conformance levels, true in
SqlConformanceEnum.BABEL,
SqlConformanceEnum.LENIENT,
SqlConformanceEnum.MYSQL_5;
false otherwise.
allowNiladicParentheses in interface SqlConformanceallowNiladicParentheses in class SqlAbstractConformancepublic boolean allowAliasUnnestItems()
SqlConformanceE.g. in UNNEST(a_array, b_array) AS T(a, b), a and b will be aliases of elements in a_array and b_array respectively.
Without this flag set, T will be the alias of the element in a_array and a, b will be the top level fields of T if T is a STRUCT type.
Among the built-in conformance levels, true in
SqlConformanceEnum.PRESTO;
false otherwise.
allowAliasUnnestItems in interface SqlConformanceallowAliasUnnestItems in class SqlAbstractConformancepublic SqlLibrary semantics()
SqlConformanceConsider the SUBSTRING operator. In ISO standard SQL, negative
start indexes are converted to 1; in Google BigQuery, negative start
indexes are treated as offsets from the end of the string. For example,
SUBSTRING('abcde' FROM -3 FOR 2) returns 'ab' in standard
SQL and 'cd' in BigQuery.
If you specify conformance=BIG_QUERY in your connection
parameters, SUBSTRING will give the BigQuery behavior. Similarly
MySQL and Oracle.
Among the built-in conformance levels:
SqlConformanceEnum.BIG_QUERY returns
SqlLibrary.BIG_QUERY;
SqlConformanceEnum.MYSQL_5 returns SqlLibrary.MYSQL;
SqlConformanceEnum.ORACLE_10 and
SqlConformanceEnum.ORACLE_12 return SqlLibrary.ORACLE;
SqlLibrary.STANDARD.
semantics in interface SqlConformancesemantics in class SqlAbstractConformanceCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.