Package mondrian.spi.impl
Class GreenplumDialect
java.lang.Object
mondrian.spi.impl.JdbcDialectImpl
mondrian.spi.impl.PostgreSqlDialect
mondrian.spi.impl.GreenplumDialect
- All Implemented Interfaces:
Dialect
Implementation of
Dialect for the GreenplumSQL database.- Since:
- Dec 23, 2009
- Author:
- Millersoft
-
Nested Class Summary
Nested classes/interfaces inherited from interface mondrian.spi.Dialect
Dialect.DatabaseProduct, Dialect.Datatype -
Field Summary
FieldsFields inherited from class mondrian.spi.impl.JdbcDialectImpl
databaseProduct, permitsSelectNotInGroupBy, productVersion -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this Dialect supports distinct aggregations.booleanInforms Mondrian if the dialect supports regular expressions when creating the 'where' or the 'having' clause.Some databases, like Greenplum, don't include nulls as part of the results of a COUNT sql call.Returns the database for this Dialect, orDialect.DatabaseProduct.UNKNOWNif the database is not a common database.booleanReturns whether this Dialect requires subqueries in the FROM clause to have an alias.booleanReturns true if this Dialect can include expressions in the GROUP BY clause only by adding an expression to the SELECT clause and using its alias.booleanReturns whether this Dialect allows the GROUPING SETS construct in the GROUP BY clause.Methods inherited from class mondrian.spi.impl.PostgreSqlDialect
generateOrderByNulls, generateRegularExpression, getTypeMethods inherited from class mondrian.spi.impl.JdbcDialectImpl
allowsAs, allowsCompoundCountDistinct, allowsCountDistinctWithOtherAggs, allowsDdl, allowsDialectSharing, allowsFromQuery, allowsJoinOn, allowsMultipleCountDistinct, allowsMultipleDistinctSqlMeasures, allowsOrderByAlias, allowsSelectNotInGroupBy, appendHintsAfterFromClause, caseWhenElse, computeStatisticsProviders, deduceIdentifierQuoteString, deduceMaxColumnNameLength, deduceProductName, deduceProductVersion, deduceReadOnly, deduceSupportedResultSetStyles, deduceSupportsSelectNotInGroupBy, extractEmbeddedFlags, generateInline, generateInlineForAnsi, generateInlineGeneric, generateOrderByNullsAnsi, generateOrderItem, getMaxColumnNameLength, getProduct, getQuoteIdentifierString, getStatisticsProviders, isDatabase, needsExponent, quote, quoteBooleanLiteral, quoteDateLiteral, quoteDateLiteral, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteIdentifier, quoteNumericLiteral, quoteStringLiteral, quoteTimeLiteral, quoteTimestampLiteral, quoteTimestampLiteral, requiresHavingAlias, requiresOrderByAlias, requiresUnionOrderByExprToBeInSelectClause, requiresUnionOrderByOrdinal, supportsGroupByExpressions, supportsMultiValueInExpr, supportsResultSetConcurrency, supportsUnlimitedValueList, toString, toUpper
-
Field Details
-
FACTORY
-
-
Constructor Details
-
GreenplumDialect
Creates a GreenplumDialect.- Parameters:
connection- Connection- Throws:
SQLException
-
-
Method Details
-
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
-
requiresGroupByAlias
public boolean requiresGroupByAlias()Description copied from interface:DialectReturns true if this Dialect can include expressions in the GROUP BY clause only by adding an expression to the SELECT clause and using its alias.For example, in such a dialect,
would be illegal, butSELECT x, x FROM t GROUP BY x
would be legal.SELECT x AS a, x AS b FROM t ORDER BY a, bInfobright is the only such dialect.
- Specified by:
requiresGroupByAliasin interfaceDialect- Overrides:
requiresGroupByAliasin classJdbcDialectImpl- Returns:
- Whether this Dialect can include expressions in the GROUP BY clause only by adding an expression to the SELECT clause and using its alias
-
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 classPostgreSqlDialect- Returns:
- whether dialewct requires subqueries to have an alias
- See Also:
-
allowsCountDistinct
public boolean allowsCountDistinct()Description copied from interface:DialectReturns whether this Dialect supports distinct aggregations.For example, Access does not allow
select count(distinct x) from t- Specified by:
allowsCountDistinctin interfaceDialect- Overrides:
allowsCountDistinctin classJdbcDialectImpl- Returns:
- whether Dialect allows COUNT DISTINCT
-
getDatabaseProduct
Description copied from interface:DialectReturns the database for this Dialect, orDialect.DatabaseProduct.UNKNOWNif the database is not a common database.- Specified by:
getDatabaseProductin interfaceDialect- Overrides:
getDatabaseProductin classPostgreSqlDialect- Returns:
- Database
-
generateCountExpression
Description copied from interface:DialectSome databases, like Greenplum, don't include nulls as part of the results of a COUNT sql call. This allows dialects to wrap the count expression in something before it is used in the query.- Specified by:
generateCountExpressionin interfaceDialect- Overrides:
generateCountExpressionin classJdbcDialectImpl- Parameters:
exp- The expression to wrap.- Returns:
- A valid expression to use for a count operation.
-
allowsRegularExpressionInWhereClause
public boolean allowsRegularExpressionInWhereClause()Description copied from interface:DialectInforms Mondrian if the dialect supports regular expressions when creating the 'where' or the 'having' clause.- Specified by:
allowsRegularExpressionInWhereClausein interfaceDialect- Overrides:
allowsRegularExpressionInWhereClausein classPostgreSqlDialect- Returns:
- True if regular expressions are supported.
-