Package org.apache.calcite.sql.dialect
Class JethroDataSqlDialect
- java.lang.Object
-
- org.apache.calcite.sql.SqlDialect
-
- org.apache.calcite.sql.dialect.JethroDataSqlDialect
-
public class JethroDataSqlDialect extends SqlDialect
ASqlDialect
implementation for the JethroData database.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JethroDataSqlDialect.JethroInfo
Information about the capabilities of a Jethro database.static interface
JethroDataSqlDialect.JethroInfoCache
Stores information about capabilities of Jethro databases.private static class
JethroDataSqlDialect.JethroInfoCacheImpl
Implementation ofJethroInfoCache
.(package private) static class
JethroDataSqlDialect.JethroSupportedFunction
Information about a function supported by Jethro.-
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 private JethroDataSqlDialect.JethroInfo
info
-
Fields inherited from class org.apache.calcite.sql.SqlDialect
BUILT_IN_OPERATORS_LIST, CALCITE, DUMMY, EMPTY_CONTEXT, LOGGER, nullCollation
-
-
Constructor Summary
Constructors Constructor Description JethroDataSqlDialect(SqlDialect.Context context)
Creates a JethroDataSqlDialect.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JethroDataSqlDialect.JethroInfoCache
createCache()
SqlNode
emulateNullDirection(SqlNode node, boolean nullsFirst, boolean desc)
Returns the SqlNode for emulating the null direction for the given field ornull
if no emulation needs to be done.boolean
supportsAggregateFunction(SqlKind kind)
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
supportsFunction(SqlOperator operator, RelDataType type, java.util.List<RelDataType> paramTypes)
Returns whether this dialect supports a given function or operator.boolean
supportsNestedAggregations()
Returns whether the dialect supports nested aggregations, for instanceSELECT SUM(SUM(1))
.boolean
supportsOffsetFetch()
Returns whether the dialect supports OFFSET/FETCH clauses introduced by SQL:2008, for instanceOFFSET 10 ROWS FETCH NEXT 20 ROWS ONLY
.-
Methods inherited from class org.apache.calcite.sql.SqlDialect
allowsAs, create, defaultNullDirection, emptyContext, emulateNullDirectionWithIsNull, getCalendarPolicy, getCastSpec, getDatabaseProduct, getNullCollation, getProduct, getTypeSystem, hasImplicitTableAlias, identifierNeedsToBeQuoted, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteStringLiteral, quoteStringLiteralUnicode, quoteTimestampLiteral, requiresAliasForFromItems, rewriteSingleValueExpr, supportsAliasedValues, supportsWindowFunctions, unparseCall, unparseDateTimeLiteral, unparseFetchUsingAnsi, unparseFetchUsingLimit, unparseOffsetFetch, unparseSqlDatetimeArithmetic, unparseSqlIntervalLiteral, unparseSqlIntervalQualifier, unquoteStringLiteral
-
-
-
-
Field Detail
-
info
private final JethroDataSqlDialect.JethroInfo info
-
-
Constructor Detail
-
JethroDataSqlDialect
public JethroDataSqlDialect(SqlDialect.Context context)
Creates a JethroDataSqlDialect.
-
-
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
-
emulateNullDirection
public SqlNode emulateNullDirection(SqlNode node, boolean nullsFirst, boolean desc)
Description copied from class:SqlDialect
Returns the SqlNode for emulating the null direction for the given field ornull
if no emulation needs to be done.- Overrides:
emulateNullDirection
in classSqlDialect
- Parameters:
node
- The SqlNode representing the expressionnullsFirst
- Whether nulls should come firstdesc
- Whether the sort direction isRelFieldCollation.Direction.DESCENDING
orRelFieldCollation.Direction.STRICTLY_DESCENDING
- Returns:
- A SqlNode for null direction emulation or
null
if not required
-
supportsAggregateFunction
public boolean supportsAggregateFunction(SqlKind kind)
- Overrides:
supportsAggregateFunction
in classSqlDialect
-
supportsFunction
public boolean supportsFunction(SqlOperator operator, RelDataType type, java.util.List<RelDataType> paramTypes)
Description copied from class:SqlDialect
Returns whether this dialect supports a given function or operator. It only applies to built-in scalar functions and operators, since user-defined functions and procedures should be read by JdbcSchema.- Overrides:
supportsFunction
in classSqlDialect
-
supportsOffsetFetch
public boolean supportsOffsetFetch()
Description copied from class:SqlDialect
Returns whether the dialect supports OFFSET/FETCH clauses introduced by SQL:2008, for instanceOFFSET 10 ROWS FETCH NEXT 20 ROWS ONLY
. If false, we assume that the dialect supports the alternative syntaxLIMIT 20 OFFSET 10
.- Overrides:
supportsOffsetFetch
in classSqlDialect
-
supportsNestedAggregations
public boolean supportsNestedAggregations()
Description copied from class:SqlDialect
Returns whether the dialect supports nested aggregations, for instanceSELECT SUM(SUM(1))
.- Overrides:
supportsNestedAggregations
in classSqlDialect
-
createCache
public static JethroDataSqlDialect.JethroInfoCache createCache()
-
-