public class OracleSqlDialect extends SqlDialect
SqlDialect implementation for the Oracle database.SqlDialect.CalendarPolicy, SqlDialect.Context, SqlDialect.DatabaseProduct, SqlDialect.FakeUtil| Modifier and Type | Field and Description |
|---|---|
static SqlDialect |
DEFAULT |
static SqlDialect.Context |
DEFAULT_CONTEXT |
BUILT_IN_OPERATORS_LIST, EMPTY_CONTEXT, identifierEndQuoteString, identifierEscapedQuote, identifierQuoteString, literalEndQuoteString, literalEscapedQuote, literalQuoteString, LOGGER, nullCollation| Constructor and Description |
|---|
OracleSqlDialect(SqlDialect.Context context)
Creates an OracleSqlDialect.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
allowsAs() |
@Nullable SqlNode |
getCastSpec(RelDataType type)
Returns SqlNode for type in "cast(column as type)", which might be
different between databases by type name, precision etc.
|
List<String> |
getSingleRowTableName()
Returns the name of the system table that has precisely one row.
|
boolean |
supportsAliasedValues()
Returns whether the dialect supports VALUES in a sub-query with
and an "AS t(column, ...)" values to define column names.
|
boolean |
supportsApproxCountDistinct()
Returns whether this dialect supports APPROX_COUNT_DISTINCT functions.
|
boolean |
supportsCharSet()
Returns whether the dialect supports character set names as part of a
data type, for instance
VARCHAR(30) CHARACTER SET `ISO-8859-1`. |
boolean |
supportsDataType(RelDataType type)
Returns whether this dialect supports a given type.
|
void |
unparseCall(SqlWriter writer,
SqlCall call,
int leftPrec,
int rightPrec) |
void |
unparseDateTimeLiteral(SqlWriter writer,
SqlAbstractDateTimeLiteral literal,
int leftPrec,
int rightPrec) |
configureParser, configureParser, containsNonAscii, create, defaultNullDirection, emulateJoinTypeForCrossJoin, emulateNullDirection, emulateNullDirectionWithIsNull, getCalendarPolicy, getConformance, getDatabaseProduct, getNullCollation, getProduct, getQuotedCasing, getQuoting, getTypeSystem, getUnquotedCasing, hasImplicitTableAlias, identifierNeedsQuote, isCaseSensitive, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteStringLiteral, quoteStringLiteral, quoteStringLiteralUnicode, quoteTimestampLiteral, requiresAliasForFromItems, rewriteSingleValueExpr, supportsAggregateFunction, supportsAggregateFunctionFilter, supportsFunction, supportsGroupByLiteral, supportsGroupByWithCube, supportsGroupByWithRollup, supportsImplicitTypeCoercion, supportsJoinType, supportsNestedAggregations, supportsOffsetFetch, supportsWindowFunctions, unparseFetchUsingAnsi, unparseFetchUsingLimit, unparseLimit, unparseOffset, unparseOffsetFetch, unparseSqlDatetimeArithmetic, unparseSqlIntervalLiteral, unparseSqlIntervalQualifier, unparseTableScanHints, unparseTopN, unquoteStringLiteralpublic static final SqlDialect.Context DEFAULT_CONTEXT
public static final SqlDialect DEFAULT
public OracleSqlDialect(SqlDialect.Context context)
public boolean supportsApproxCountDistinct()
SqlDialectsupportsApproxCountDistinct in class SqlDialectpublic boolean supportsCharSet()
SqlDialectVARCHAR(30) CHARACTER SET `ISO-8859-1`.supportsCharSet in class SqlDialectpublic boolean supportsDataType(RelDataType type)
SqlDialectsupportsDataType in class SqlDialectpublic @Nullable SqlNode getCastSpec(RelDataType type)
SqlDialectIf this method returns null, the cast will be omitted. In the default
implementation, this is the case for the NULL type, and therefore
CAST(NULL AS <nulltype>) is rendered as NULL.
getCastSpec in class SqlDialectprotected boolean allowsAs()
allowsAs in class SqlDialectpublic boolean supportsAliasedValues()
SqlDialectCurrently, only Oracle does not. For this, we generate "SELECT v0 AS c0, v1 AS c1 ... UNION ALL ...". We may need to refactor this method when we support VALUES for other dialects.
supportsAliasedValues in class SqlDialectpublic void unparseDateTimeLiteral(SqlWriter writer, SqlAbstractDateTimeLiteral literal, int leftPrec, int rightPrec)
unparseDateTimeLiteral in class SqlDialectpublic List<String> getSingleRowTableName()
SqlDialectFor VALUES 1,
Oracle returns ["DUAL"] and we generate "SELECT 1 FROM DUAL";
MySQL returns null and we generate "SELECT 1".
getSingleRowTableName in class SqlDialectpublic void unparseCall(SqlWriter writer, SqlCall call, int leftPrec, int rightPrec)
unparseCall in class SqlDialectCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.