Package org.apache.calcite.sql.dialect
Class Db2SqlDialect
java.lang.Object
org.apache.calcite.sql.SqlDialect
org.apache.calcite.sql.dialect.Db2SqlDialect
A
SqlDialect
implementation for the IBM DB2 database.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.calcite.sql.SqlDialect
SqlDialect.CalendarPolicy, SqlDialect.Context, SqlDialect.DatabaseProduct, SqlDialect.FakeUtil
-
Field Summary
Fields inherited from class org.apache.calcite.sql.SqlDialect
BUILT_IN_OPERATORS_LIST, EMPTY_CONTEXT, identifierEndQuoteString, identifierEscapedQuote, identifierQuoteString, literalEndQuoteString, literalEscapedQuote, literalQuoteString, LOGGER, nullCollation
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether a qualified table in the FROM clause has an implicit alias which consists of just the table name.boolean
Returns whether the dialect supports character set names as part of a data type, for instanceVARCHAR(30) CHARACTER SET `ISO-8859-1`
.void
unparseSqlIntervalLiteral
(SqlWriter writer, SqlIntervalLiteral literal, int leftPrec, int rightPrec) Converts an interval literal to a SQL string.void
unparseSqlIntervalQualifier
(SqlWriter writer, SqlIntervalQualifier qualifier, RelDataTypeSystem typeSystem) Converts an interval qualifier to a SQL string.Methods inherited from class org.apache.calcite.sql.SqlDialect
allowsAs, configureParser, configureParser, containsNonAscii, create, defaultNullDirection, emulateJoinTypeForCrossJoin, emulateNullDirection, emulateNullDirectionWithIsNull, getCalendarPolicy, getCastSpec, getConformance, getDatabaseProduct, getFormatModel, getNullCollation, getProduct, getQuotedCasing, getQuoting, getSingleRowTableName, getTypeSystem, getUnquotedCasing, identifierNeedsQuote, isCaseSensitive, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteStringLiteral, quoteStringLiteral, quoteStringLiteralUnicode, quoteTimestampLiteral, requiresAliasForFromItems, rewriteMaxMin, rewriteMaxMinExpr, rewriteSingleValueExpr, supportBooleanCaseWhen, supportsAggregateFunction, supportsAggregateFunctionFilter, supportsAliasedValues, supportsApproxCountDistinct, supportsDataType, supportsFunction, supportsGroupByLiteral, supportsGroupByWithCube, supportsGroupByWithRollup, supportsImplicitTypeCoercion, supportsJoinType, supportsNestedAggregations, supportsOffsetFetch, supportsTimestampPrecision, supportsWindowFunctions, unparseBoolLiteral, unparseCall, unparseDateTimeLiteral, unparseFetchUsingAnsi, unparseFetchUsingLimit, unparseLimit, unparseOffset, unparseOffsetFetch, unparseSqlDatetimeArithmetic, unparseTableScanHints, unparseTopN, unquoteStringLiteral
-
Field Details
-
DEFAULT_CONTEXT
-
DEFAULT
-
-
Constructor Details
-
Db2SqlDialect
Creates a Db2SqlDialect.
-
-
Method Details
-
supportsCharSet
public boolean supportsCharSet()Description copied from class:SqlDialect
Returns whether the dialect supports character set names as part of a data type, for instanceVARCHAR(30) CHARACTER SET `ISO-8859-1`
.- Overrides:
supportsCharSet
in classSqlDialect
-
hasImplicitTableAlias
public boolean hasImplicitTableAlias()Description copied from class:SqlDialect
Returns whether a qualified table in the FROM clause has an implicit alias which consists of just the table name.For example, in
SqlDialect.DatabaseProduct.ORACLE
SELECT * FROM sales.emp
is equivalent to
SELECT * FROM sales.emp AS emp
and therefore
SELECT emp.empno FROM sales.emp
is valid. But
SqlDialect.DatabaseProduct.DB2
does not have an implicit alias, so the previous query it not valid; you need to writeSELECT sales.emp.empno FROM sales.emp
Returns true for all databases except DB2.
- Overrides:
hasImplicitTableAlias
in classSqlDialect
-
unparseSqlIntervalQualifier
public void unparseSqlIntervalQualifier(SqlWriter writer, SqlIntervalQualifier qualifier, RelDataTypeSystem typeSystem) Description copied from class:SqlDialect
Converts an interval qualifier to a SQL string. The default implementation returns strings such asINTERVAL '1 2:3:4' DAY(4) TO SECOND(4)
.- Overrides:
unparseSqlIntervalQualifier
in classSqlDialect
-
unparseSqlIntervalLiteral
public void unparseSqlIntervalLiteral(SqlWriter writer, SqlIntervalLiteral literal, int leftPrec, int rightPrec) Description copied from class:SqlDialect
Converts an interval literal to a SQL string. The default implementation returns strings such asINTERVAL '1 2:3:4' DAY(4) TO SECOND(4)
.- Overrides:
unparseSqlIntervalLiteral
in classSqlDialect
-