Package org.apache.calcite.sql.dialect
Class HsqldbSqlDialect
- java.lang.Object
-
- org.apache.calcite.sql.SqlDialect
-
- org.apache.calcite.sql.dialect.HsqldbSqlDialect
-
public class HsqldbSqlDialect extends SqlDialect
ASqlDialect
implementation for the Hsqldb 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 HsqldbSqlDialect(SqlDialect.Context context)
Creates an HsqldbSqlDialect.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.String
convertTimeUnit(org.apache.calcite.avatica.util.TimeUnitRange unit)
SqlNode
rewriteSingleValueExpr(SqlNode aggCall)
Rewrite SINGLE_VALUE into expression based on database variants E.g.boolean
supportsCharSet()
Returns whether the dialect supports character set names as part of a data type, for instanceVARCHAR(30) CHARACTER SET `ISO-8859-1`
.boolean
supportsWindowFunctions()
Returns whether this dialect supports window functions (OVER clause).void
unparseCall(SqlWriter writer, SqlCall call, int leftPrec, int rightPrec)
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, supportsAggregateFunction, supportsAliasedValues, supportsFunction, supportsNestedAggregations, supportsOffsetFetch, unparseDateTimeLiteral, unparseFetchUsingAnsi, unparseFetchUsingLimit, unparseSqlDatetimeArithmetic, unparseSqlIntervalLiteral, unparseSqlIntervalQualifier, unquoteStringLiteral
-
-
-
-
Field Detail
-
DEFAULT
public static final SqlDialect DEFAULT
-
-
Constructor Detail
-
HsqldbSqlDialect
public HsqldbSqlDialect(SqlDialect.Context context)
Creates an HsqldbSqlDialect.
-
-
Method Detail
-
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
-
supportsWindowFunctions
public boolean supportsWindowFunctions()
Description copied from class:SqlDialect
Returns whether this dialect supports window functions (OVER clause).- Overrides:
supportsWindowFunctions
in classSqlDialect
-
unparseCall
public void unparseCall(SqlWriter writer, SqlCall call, int leftPrec, int rightPrec)
- Overrides:
unparseCall
in classSqlDialect
-
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)
-
rewriteSingleValueExpr
public SqlNode rewriteSingleValueExpr(SqlNode aggCall)
Description copied from class:SqlDialect
Rewrite SINGLE_VALUE into expression based on database variants E.g. HSQLDB, MYSQL, ORACLE, etc- Overrides:
rewriteSingleValueExpr
in classSqlDialect
-
convertTimeUnit
private static java.lang.String convertTimeUnit(org.apache.calcite.avatica.util.TimeUnitRange unit)
-
-