Package org.apache.calcite.sql.dialect
Class RedshiftSqlDialect
- java.lang.Object
-
- org.apache.calcite.sql.SqlDialect
-
- org.apache.calcite.sql.dialect.RedshiftSqlDialect
-
public class RedshiftSqlDialect extends SqlDialect
ASqlDialect
implementation for the Redshift 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 Modifier and Type Field Description static SqlDialect
DEFAULT
-
Fields inherited from class org.apache.calcite.sql.SqlDialect
BUILT_IN_OPERATORS_LIST, CALCITE, DUMMY, EMPTY_CONTEXT, LOGGER, nullCollation
-
-
Constructor Summary
Constructors Constructor Description RedshiftSqlDialect(SqlDialect.Context context)
Creates a RedshiftSqlDialect.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
unparseOffsetFetch(SqlWriter writer, SqlNode offset, SqlNode fetch)
Converts an offset and fetch into SQL.-
Methods inherited from class org.apache.calcite.sql.SqlDialect
allowsAs, create, defaultNullDirection, emptyContext, emulateNullDirection, emulateNullDirectionWithIsNull, getCalendarPolicy, getCastSpec, getDatabaseProduct, getNullCollation, getProduct, getTypeSystem, hasImplicitTableAlias, identifierNeedsToBeQuoted, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteStringLiteral, quoteStringLiteralUnicode, quoteTimestampLiteral, requiresAliasForFromItems, rewriteSingleValueExpr, supportsAggregateFunction, supportsAliasedValues, supportsCharSet, supportsFunction, supportsNestedAggregations, supportsOffsetFetch, supportsWindowFunctions, unparseCall, unparseDateTimeLiteral, unparseFetchUsingAnsi, unparseFetchUsingLimit, unparseSqlDatetimeArithmetic, unparseSqlIntervalLiteral, unparseSqlIntervalQualifier, unquoteStringLiteral
-
-
-
-
Field Detail
-
DEFAULT
public static final SqlDialect DEFAULT
-
-
Constructor Detail
-
RedshiftSqlDialect
public RedshiftSqlDialect(SqlDialect.Context context)
Creates a RedshiftSqlDialect.
-
-
Method Detail
-
unparseOffsetFetch
public void unparseOffsetFetch(SqlWriter writer, SqlNode offset, SqlNode fetch)
Description copied from class:SqlDialect
Converts an offset and fetch into SQL.At least one of
offset
andfetch
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)
- Overrides:
unparseOffsetFetch
in classSqlDialect
- Parameters:
writer
- Writeroffset
- Number of rows to skip before emitting, or nullfetch
- Number of rows to fetch, or null- See Also:
SqlDialect.unparseFetchUsingAnsi(SqlWriter, SqlNode, SqlNode)
,SqlDialect.unparseFetchUsingLimit(SqlWriter, SqlNode, SqlNode)
-
-