Class Hive2QueryRewriter
- java.lang.Object
-
- org.apache.metamodel.jdbc.dialects.AbstractQueryRewriter
-
- org.apache.metamodel.jdbc.dialects.DefaultQueryRewriter
-
- org.apache.metamodel.jdbc.dialects.LimitOffsetQueryRewriter
-
- org.apache.metamodel.jdbc.dialects.Hive2QueryRewriter
-
- All Implemented Interfaces:
IQueryRewriter
- Direct Known Subclasses:
ImpalaQueryRewriter
public class Hive2QueryRewriter extends LimitOffsetQueryRewriter
Query rewriter for Apache Hive
-
-
Constructor Summary
Constructors Constructor Description Hive2QueryRewriter(JdbcDataContext dataContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisPrimaryKeySupported()Determines if the JDBC data source supports primary keys or not.booleanisTransactional()Determines if the JDBC data source supports transactions or not.StringrewriteColumnType(org.apache.metamodel.schema.ColumnType columnType, Integer columnSize)Rewrites the name of a column type, as it is written in CREATE TABLE statements.-
Methods inherited from class org.apache.metamodel.jdbc.dialects.LimitOffsetQueryRewriter
isFirstRowSupported, isMaxRowsSupported, rewriteQuery
-
Methods inherited from class org.apache.metamodel.jdbc.dialects.DefaultQueryRewriter
beforeRewrite, escapeQuotes, isAggregateFunctionSupported, isScalarFunctionSupported, needsQuoting, rewriteFilterItem, rewriteFilterItemWithOperandLiteral, rewriteTimestamp
-
Methods inherited from class org.apache.metamodel.jdbc.dialects.AbstractQueryRewriter
getColumnType, getDataContext, getResultSetValue, isSchemaIncludedInColumnPaths, isSupportedVersion, rewriteColumnTypeInternal, rewriteFromClause, rewriteFromItem, rewriteFromItem, rewriteGroupByClause, rewriteGroupByItem, rewriteHavingClause, rewriteOrderByClause, rewriteOrderByItem, rewriteSelectClause, rewriteSelectItem, rewriteWhereClause, setStatementParameter, toTime, toTimestamp
-
-
-
-
Constructor Detail
-
Hive2QueryRewriter
public Hive2QueryRewriter(JdbcDataContext dataContext)
-
-
Method Detail
-
rewriteColumnType
public String rewriteColumnType(org.apache.metamodel.schema.ColumnType columnType, Integer columnSize)
Description copied from interface:IQueryRewriterRewrites the name of a column type, as it is written in CREATE TABLE statements. Some databases dont support all column types, or have different names for them. The implementation of this method will do that conversion.- Specified by:
rewriteColumnTypein interfaceIQueryRewriter- Overrides:
rewriteColumnTypein classDefaultQueryRewriter- Parameters:
columnType- the (non-null)ColumnTypeto rewritecolumnSize- the (possibly null) column size that may or may not have been specified- Returns:
-
isTransactional
public boolean isTransactional()
Description copied from interface:IQueryRewriterDetermines if the JDBC data source supports transactions or not. Usually this is the case since JDBC is designed for ACID compliant databases, but in some cases the JDBC interface is used also to facilitate connectivity to non-transactional data source such as Apache Hive and others.- Specified by:
isTransactionalin interfaceIQueryRewriter- Overrides:
isTransactionalin classAbstractQueryRewriter- Returns:
-
isPrimaryKeySupported
public boolean isPrimaryKeySupported()
Description copied from interface:IQueryRewriterDetermines if the JDBC data source supports primary keys or not.- Specified by:
isPrimaryKeySupportedin interfaceIQueryRewriter- Overrides:
isPrimaryKeySupportedin classDefaultQueryRewriter- Returns:
-
-