public class FireboltSqlDialect extends SqlDialect
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 |
|---|
FireboltSqlDialect(SqlDialect.Context context)
Creates a FireboltSqlDialect.
|
| Modifier and Type | Method and Description |
|---|---|
@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.
|
protected boolean |
identifierNeedsQuote(String val)
Returns whether to quote an identifier.
|
boolean |
supportsAggregateFunction(SqlKind kind) |
boolean |
supportsAggregateFunctionFilter()
Returns whether this dialect supports the use of FILTER clauses for
aggregate 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 |
supportsFunction(SqlOperator operator,
RelDataType type,
List<RelDataType> paramTypes)
Returns whether this dialect supports a given function or operator.
|
void |
unparseCall(SqlWriter writer,
SqlCall call,
int leftPrec,
int rightPrec) |
void |
unparseOffsetFetch(SqlWriter writer,
@Nullable SqlNode offset,
@Nullable SqlNode fetch)
Converts an offset and fetch into SQL.
|
allowsAs, configureParser, configureParser, containsNonAscii, create, defaultNullDirection, emulateJoinTypeForCrossJoin, emulateNullDirection, emulateNullDirectionWithIsNull, getCalendarPolicy, getConformance, getDatabaseProduct, getNullCollation, getProduct, getQuotedCasing, getQuoting, getSingleRowTableName, getTypeSystem, getUnquotedCasing, hasImplicitTableAlias, isCaseSensitive, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteStringLiteral, quoteStringLiteral, quoteStringLiteralUnicode, quoteTimestampLiteral, requiresAliasForFromItems, rewriteSingleValueExpr, supportsAliasedValues, supportsApproxCountDistinct, supportsDataType, supportsGroupByLiteral, supportsGroupByWithCube, supportsGroupByWithRollup, supportsImplicitTypeCoercion, supportsJoinType, supportsNestedAggregations, supportsOffsetFetch, supportsWindowFunctions, unparseDateTimeLiteral, unparseFetchUsingAnsi, unparseFetchUsingLimit, unparseLimit, unparseOffset, unparseSqlDatetimeArithmetic, unparseSqlIntervalLiteral, unparseSqlIntervalQualifier, unparseTableScanHints, unparseTopN, unquoteStringLiteralpublic static final SqlDialect.Context DEFAULT_CONTEXT
public static final SqlDialect DEFAULT
public FireboltSqlDialect(SqlDialect.Context context)
public boolean supportsCharSet()
SqlDialectVARCHAR(30) CHARACTER SET `ISO-8859-1`.supportsCharSet in class SqlDialectpublic void unparseOffsetFetch(SqlWriter writer, @Nullable SqlNode offset, @Nullable SqlNode fetch)
SqlDialectAt least one of offset and fetch must be provided.
Common options:
OFFSET offset ROWS FETCH NEXT fetch ROWS ONLY
(ANSI standard SQL, Oracle, PostgreSQL, and the default)
LIMIT fetch OFFSET offset (Apache Hive, MySQL, Redshift)
unparseOffsetFetch in class SqlDialectwriter - Writeroffset - Number of rows to skip before emitting, or nullfetch - Number of rows to fetch, or nullSqlDialect.unparseFetchUsingAnsi(SqlWriter, SqlNode, SqlNode),
SqlDialect.unparseFetchUsingLimit(SqlWriter, SqlNode, SqlNode)public boolean supportsAggregateFunction(SqlKind kind)
supportsAggregateFunction in class SqlDialectprotected boolean identifierNeedsQuote(String val)
SqlDialectidentifierNeedsQuote 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 SqlDialectpublic boolean supportsAggregateFunctionFilter()
SqlDialectCOUNT(*) FILTER (WHERE a = 2).supportsAggregateFunctionFilter in class SqlDialectpublic boolean supportsFunction(SqlOperator operator, RelDataType type, List<RelDataType> paramTypes)
SqlDialectsupportsFunction 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.