Package org.apache.calcite.sql.dialect
Class SnowflakeSqlDialect
java.lang.Object
org.apache.calcite.sql.SqlDialect
org.apache.calcite.sql.dialect.SnowflakeSqlDialect
A
SqlDialect
implementation for the Snowflake 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
ConstructorDescriptionSnowflakeSqlDialect
(SqlDialect.Context context) Creates a SnowflakeSqlDialect. -
Method Summary
Modifier and TypeMethodDescriptionstatic SqlNode
rewriteMaxMin
(SqlNode aggCall, RelDataType relDataType) Helper for rewrites of MAX/MIN.rewriteMaxMinExpr
(SqlNode aggCall, RelDataType relDataType) Rewrites MAX(x)/MIN(x) as BOOL_OR(x)/BOOL_AND(x) for certain database variants (Postgres and Redshift, currently).boolean
Returns whether this dialect supports APPROX_COUNT_DISTINCT functions.void
unparseCall
(SqlWriter writer, SqlCall call, int leftPrec, int rightPrec) 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, hasImplicitTableAlias, identifierNeedsQuote, isCaseSensitive, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteStringLiteral, quoteStringLiteral, quoteStringLiteralUnicode, quoteTimestampLiteral, requiresAliasForFromItems, rewriteSingleValueExpr, supportBooleanCaseWhen, supportsAggregateFunction, supportsAggregateFunctionFilter, supportsAliasedValues, supportsCharSet, supportsDataType, supportsFunction, supportsGroupByLiteral, supportsGroupByWithCube, supportsGroupByWithRollup, supportsImplicitTypeCoercion, supportsJoinType, supportsNestedAggregations, supportsOffsetFetch, supportsTimestampPrecision, supportsWindowFunctions, unparseBoolLiteral, unparseDateTimeLiteral, unparseFetchUsingAnsi, unparseFetchUsingLimit, unparseLimit, unparseOffset, unparseOffsetFetch, unparseSqlDatetimeArithmetic, unparseSqlIntervalLiteral, unparseSqlIntervalQualifier, unparseTableScanHints, unparseTopN, unquoteStringLiteral
-
Field Details
-
DEFAULT_CONTEXT
-
DEFAULT
-
-
Constructor Details
-
SnowflakeSqlDialect
Creates a SnowflakeSqlDialect.
-
-
Method Details
-
unparseCall
- Overrides:
unparseCall
in classSqlDialect
-
rewriteMaxMinExpr
Description copied from class:SqlDialect
Rewrites MAX(x)/MIN(x) as BOOL_OR(x)/BOOL_AND(x) for certain database variants (Postgres and Redshift, currently).- Overrides:
rewriteMaxMinExpr
in classSqlDialect
- See Also:
-
rewriteMaxMin
Helper for rewrites of MAX/MIN. Snowflake, rewrite as BOOLOR_AGG/BOOLAND_AGG if the return type is BOOLEAN. -
supportsApproxCountDistinct
public boolean supportsApproxCountDistinct()Description copied from class:SqlDialect
Returns whether this dialect supports APPROX_COUNT_DISTINCT functions.- Overrides:
supportsApproxCountDistinct
in classSqlDialect
-