Package mondrian.spi.impl
Class TeradataDialect
- java.lang.Object
-
- mondrian.spi.impl.JdbcDialectImpl
-
- mondrian.spi.impl.TeradataDialect
-
- All Implemented Interfaces:
Dialect
public class TeradataDialect extends JdbcDialectImpl
Implementation ofDialectfor the Teradata database.- Since:
- Nov 23, 2008
- Author:
- jhyde
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface mondrian.spi.Dialect
Dialect.DatabaseProduct, Dialect.Datatype
-
-
Field Summary
Fields Modifier and Type Field Description static JdbcDialectFactoryFACTORY-
Fields inherited from class mondrian.spi.impl.JdbcDialectImpl
databaseProduct, permitsSelectNotInGroupBy, productVersion
-
-
Constructor Summary
Constructors Constructor Description TeradataDialect(Connection connection)Creates a TeradataDialect.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgenerateInline(List<String> columnNames, List<String> columnTypes, List<String[]> valueList)Generates a SQL statement to represent an inline dataset.booleanrequiresAliasForFromQuery()Returns whether this Dialect requires subqueries in the FROM clause to have an alias.booleanrequiresUnionOrderByOrdinal()Returns true if this dialect allows only integers in the ORDER BY clause of a UNION (or other set operation) query.booleansupportsGroupingSets()Returns whether this Dialect allows the GROUPING SETS construct in the GROUP BY clause.-
Methods inherited from class mondrian.spi.impl.JdbcDialectImpl
allowsAs, allowsCompoundCountDistinct, allowsCountDistinct, allowsCountDistinctWithOtherAggs, allowsDdl, allowsDialectSharing, allowsFromQuery, allowsJoinOn, allowsMultipleCountDistinct, allowsMultipleDistinctSqlMeasures, allowsOrderByAlias, allowsRegularExpressionInWhereClause, allowsSelectNotInGroupBy, appendHintsAfterFromClause, caseWhenElse, computeStatisticsProviders, deduceIdentifierQuoteString, deduceMaxColumnNameLength, deduceProductName, deduceProductVersion, deduceReadOnly, deduceSupportedResultSetStyles, deduceSupportsSelectNotInGroupBy, extractEmbeddedFlags, generateCountExpression, generateInlineForAnsi, generateInlineGeneric, generateOrderByNulls, generateOrderByNullsAnsi, generateOrderItem, generateRegularExpression, getDatabaseProduct, getMaxColumnNameLength, getProduct, getQuoteIdentifierString, getStatisticsProviders, getType, isDatabase, needsExponent, quote, quoteBooleanLiteral, quoteDateLiteral, quoteDateLiteral, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteNumericLiteral, quoteStringLiteral, quoteTimeLiteral, quoteTimestampLiteral, quoteTimestampLiteral, requiresGroupByAlias, requiresHavingAlias, requiresOrderByAlias, requiresUnionOrderByExprToBeInSelectClause, supportsGroupByExpressions, supportsMultiValueInExpr, supportsResultSetConcurrency, supportsUnlimitedValueList, toString, toUpper
-
-
-
-
Field Detail
-
FACTORY
public static final JdbcDialectFactory FACTORY
-
-
Constructor Detail
-
TeradataDialect
public TeradataDialect(Connection connection) throws SQLException
Creates a TeradataDialect.- Parameters:
connection- Connection- Throws:
SQLException
-
-
Method Detail
-
requiresAliasForFromQuery
public boolean requiresAliasForFromQuery()
Description copied from interface:DialectReturns whether this Dialect requires subqueries in the FROM clause to have an alias.- Specified by:
requiresAliasForFromQueryin interfaceDialect- Overrides:
requiresAliasForFromQueryin classJdbcDialectImpl- Returns:
- whether dialewct requires subqueries to have an alias
- See Also:
Dialect.allowsFromQuery()
-
generateInline
public String generateInline(List<String> columnNames, List<String> columnTypes, List<String[]> valueList)
Description copied from interface:DialectGenerates a SQL statement to represent an inline dataset.For example, for Oracle, generates
SELECT 1 AS FOO, 'a' AS BAR FROM dual UNION ALL SELECT 2 AS FOO, 'b' AS BAR FROM dual
For ANSI SQL, generates:
VALUES (1, 'a'), (2, 'b')
- Specified by:
generateInlinein interfaceDialect- Overrides:
generateInlinein classJdbcDialectImpl- Parameters:
columnNames- List of column namescolumnTypes- List of column types ("String" or "Numeric")valueList- List of rows values- Returns:
- SQL string
-
supportsGroupingSets
public boolean supportsGroupingSets()
Description copied from interface:DialectReturns whether this Dialect allows the GROUPING SETS construct in the GROUP BY clause. Currently Greenplum, IBM DB2, Oracle, and Teradata.- Specified by:
supportsGroupingSetsin interfaceDialect- Overrides:
supportsGroupingSetsin classJdbcDialectImpl- Returns:
- Whether this Dialect allows GROUPING SETS clause
-
requiresUnionOrderByOrdinal
public boolean requiresUnionOrderByOrdinal()
Description copied from interface:DialectReturns true if this dialect allows only integers in the ORDER BY clause of a UNION (or other set operation) query.For example,
SELECT x, y + z FROM tis allowed but
UNION ALL
SELECT x, y + z FROM t
ORDER BY 1, 2SELECT x, y, z FROM tis not.
UNION ALL
SELECT x, y, z FROM t
ORDER BY xTeradata is an example of a dialect with this restriction.
- Specified by:
requiresUnionOrderByOrdinalin interfaceDialect- Overrides:
requiresUnionOrderByOrdinalin classJdbcDialectImpl- Returns:
- whether this dialect allows only integers in the ORDER BY clause of a UNION (or other set operation) query
-
-