Package org.teiid.translator.hive
Class HiveExecutionFactory
- java.lang.Object
-
- org.teiid.translator.ExecutionFactory<DataSource,Connection>
-
- org.teiid.translator.jdbc.JDBCExecutionFactory
-
- org.teiid.translator.hive.BaseHiveExecutionFactory
-
- org.teiid.translator.hive.HiveExecutionFactory
-
@Translator(name="hive", description="A translator for hive based database on HDFS") public class HiveExecutionFactory extends BaseHiveExecutionFactory
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.teiid.translator.jdbc.JDBCExecutionFactory
JDBCExecutionFactory.StructRetrieval
-
Nested classes/interfaces inherited from class org.teiid.translator.ExecutionFactory
ExecutionFactory.Format, ExecutionFactory.NullOrder, ExecutionFactory.SupportedJoinCriteria, ExecutionFactory.TransactionSupport
-
-
Field Summary
Fields Modifier and Type Field Description static String
HIVE
static Version
V_3
-
Fields inherited from class org.teiid.translator.hive.BaseHiveExecutionFactory
convert, useDatabaseMetaData
-
Fields inherited from class org.teiid.translator.jdbc.JDBCExecutionFactory
DEFAULT_MAX_DEPENDENT_PREDICATES, DEFAULT_MAX_IN_CRITERIA, DEFAULT_TIME_ZONE, dialect
-
Fields inherited from class org.teiid.translator.ExecutionFactory
DEFAULT_MAX_FROM_GROUPS, DEFAULT_MAX_IN_CRITERIA_SIZE, DEFAULT_MAX_PROJECTED_COLUMNS
-
-
Constructor Summary
Constructors Constructor Description HiveExecutionFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getSupportedFunctions()
Get list of all supported function names.ExecutionFactory.SupportedJoinCriteria
getSupportedJoinCriteria()
Get the supported join criteria.boolean
requiresLeftLinearJoin()
void
start()
Initialize the connector with supplied configurationboolean
supportsAggregatesEnhancedNumeric()
Support indicates connector can accept STDDEV_POP, STDDEV_VAR, VAR_POP, VAR_SAMPboolean
supportsElementaryOlapOperations()
boolean
supportsGroupByRollup()
boolean
supportsIsDistinctCriteria()
Support indicates connector accepts criteria of form (exp1 IS DISTINCT exp2)String
translateLiteralDate(Date dateValue)
Subclasses should override this method to provide a different sql translation of the literal date value.boolean
useParensForJoins()
Set to true to indicate that every branch of a join should have parenthesis.protected boolean
usesDatabaseVersion()
-
Methods inherited from class org.teiid.translator.hive.BaseHiveExecutionFactory
addAggregatePushDownFunction, addSourceComment, bindValue, createMetadataProcessor, createProcedureExecution, createUpdateExecution, getLikeRegexString, getMetadataProcessor, getSQLConversionVisitor, hasTimeType, isUseDatabaseMetaData, retrieveValue, retrieveValue, rewriteBooleanFunctions, setUseDatabaseMetaData, supportsBatchedUpdates, supportsBulkUpdate, supportsCommonTableExpressions, supportsConvert, supportsCorrelatedSubqueries, supportsExcept, supportsExistsCriteria, supportsHaving, supportsInCriteriaSubquery, supportsInlineViews, supportsInsertWithQueryExpression, supportsIntersect, supportsLikeCriteriaEscapeCharacter, supportsLikeRegex, supportsOrderByUnrelated, supportsQuantifiedCompareCriteriaAll, supportsQuantifiedCompareCriteriaSome, supportsRowLimit, supportsScalarSubqueries, supportsUnions, supportsWindowFunctionNthValue, translateCommand, translateLimit, translateLiteralBoolean, translateLiteralTime, translateLiteralTimestamp, useAnsiJoin, useAsInGroupAlias
-
Methods inherited from class org.teiid.translator.jdbc.JDBCExecutionFactory
afterInitialConnectionObtained, closeConnection, convertObject, createDirectExecution, createResultSetExecution, createTempTable, executeStoredProcedure, formatDateValue, formatDateValue, getCommentFormat, getConnection, getCreateTemporaryTablePostfix, getCreateTemporaryTableString, getCreateTempTableSQL, getDatabaseCalendar, getDatabaseTimeZone, getDatabaseVersion, getDefaultNullOrder, getDefaultSupportedFunctions, getDialect, getFunctionModifiers, getHibernateDialectClassName, getLateralKeyword, getMaxPreparedInsertBatchSize, getMetadata, getRemovePushdownCharacters, getSetOperationString, getSourceComment, getStructRetrieval, getTemporaryTableName, getTimestampNanoPrecision, getVersion, initCapabilities, intializeConnectionAfterCancel, isCharacterType, isDefaultTimeZone, isEnableDependentJoins, isExtendedAscii, isNonAscii, isNonAscii, isNonAsciiFunction, isSourceRequired, isSourceRequiredForCapabilities, isTrimStrings, loadedTemporaryTable, obtainedConnection, preserveNullTyping, registerFunctionModifier, registerSpecificTypeOfOutParameter, replaceElementName, retrieveGeographyValue, retrieveGeographyValue, retrieveGeometryValue, retrieveGeometryValue, setCommentFormat, setDatabaseTimeZone, setDatabaseVersion, setDatabaseVersion, setEnableDependentJoins, setFetchSize, setMaxPreparedInsertBatchSize, setRemovePushdownCharacters, setStructRetrieval, setTrimStrings, setUseBindingsForDependentJoin, setUseBindVariables, setUseCommentsInSourceQuery, supportsAggregatesAvg, supportsAggregatesCount, supportsAggregatesCountStar, supportsAggregatesDistinct, supportsAggregatesMax, supportsAggregatesMin, supportsAggregatesSum, supportsAliasedTable, supportsBooleanExpressions, supportsCompareCriteriaEquals, supportsCompareCriteriaOrdered, supportsDependentJoins, supportsFullDependentJoins, supportsGeneratedKeys, supportsGeneratedKeys, supportsGroupBy, supportsInCriteria, supportsIsNullCriteria, supportsLikeCriteria, supportsNotCriteria, supportsOrCriteria, supportsProcedureParameterExpression, supportsSearchedCaseExpressions, supportsSelectExpression, supportsSelfJoins, supportsSetQueryOrderBy, tempTableRequiresTransaction, translate, translateGeographyLiteral, translateGeographyParameter, translateGeographySelect, translateGeometryLiteral, translateGeometryParameter, translateGeometrySelect, translateLiteralBinaryType, useBindingsForDependentJoin, useBindVariables, useColumnNamesForGeneratedKeys, useCommentsInSourceQuery, useNBindingType, useParensForSetQueries, usePreparedStatements, useScientificNotation, useSelectLimit, useStreamsForLobs, useUnicodePrefix, useWithRollup
-
Methods inherited from class org.teiid.translator.ExecutionFactory
addPushDownFunction, areLobsUsableAfterClose, createExecution, getCacheDirective, getCollationLocale, getConnection, getDirectQueryProcedureName, getExcludedCommonTableExpressionName, getInstance, getLanguageFactory, getMaxDependentInPredicates, getMaxFromGroups, getMaxInCriteriaSize, getMaxProjectedColumns, getNativeQueryProcedureName, getPushDownFunctions, getRequiredLikeEscape, getTransactionSupport, getTypeFacility, isCopyLobs, isForkable, isImmutable, isSourceRequiredForMetadata, isThreadBound, requiresCriteria, returnsSingleUpdateCount, setCollationLocale, setCopyLobs, setDirectQueryProcedureName, setExcludedCommonTableExpressionName, setImmutable, setMaxDependentInPredicates, setMaxInCriteriaSize, setNativeQueryProcedureName, setRequiresCriteria, setSourceRequired, setSourceRequiredForMetadata, setSupportedJoinCriteria, setSupportsDirectQueryProcedure, setSupportsFullOuterJoins, setSupportsInnerJoins, setSupportsNativeQueries, setSupportsOrderBy, setSupportsOuterJoins, setSupportsSelectDistinct, setThreadBound, setTransactionSupport, supportsAdvancedOlapOperations, supportsAggregatesCountBig, supportsArrayAgg, supportsArrayType, supportsCompareCriteriaOrderedExclusive, supportsCorrelatedSubqueryLimit, supportsDirectQueryProcedure, supportsFormatLiteral, supportsFullOuterJoins, supportsFunctionsInGroupBy, supportsGeographyType, supportsGroupByMultipleDistinctAggregates, supportsInnerJoins, supportsLateralJoin, supportsLateralJoinCondition, supportsListAgg, supportsMultipleOpenExecutions, supportsNativeQueries, supportsOnlyCorrelatedSubqueries, supportsOnlyFormatLiterals, supportsOnlyLateralJoinProcedure, supportsOnlyLiteralComparison, supportsOnlyRelationshipStyleJoins, supportsOnlySingleTableGroupBy, supportsOnlyTimestampAddLiteral, supportsOrderBy, supportsOrderByNullOrdering, supportsOrderByWithExtendedGrouping, supportsOuterJoins, supportsPartialFiltering, supportsProcedureTable, supportsRecursiveCommonTableExpressions, supportsRowOffset, supportsScalarSubqueryProjection, supportsSelectDistinct, supportsSelectExpressionArrayType, supportsSelectWithoutFrom, supportsSetQueryLimitOffset, supportsSimilarTo, supportsStringAgg, supportsSubqueryCommonTableExpressions, supportsSubqueryInOn, supportsUpsert, supportsWindowDistinctAggregates, supportsWindowFrameClause, supportsWindowFunctionCumeDist, supportsWindowFunctionNtile, supportsWindowFunctionPercentRank, supportsWindowOrderByWithAggregates
-
-
-
-
Method Detail
-
start
public void start() throws TranslatorException
Description copied from class:ExecutionFactory
Initialize the connector with supplied configuration- Overrides:
start
in classJDBCExecutionFactory
- Throws:
TranslatorException
-
getSupportedFunctions
public List<String> getSupportedFunctions()
Description copied from class:ExecutionFactory
Get list of all supported function names. Arithmetic functions have names like "+".- Overrides:
getSupportedFunctions
in classJDBCExecutionFactory
- See Also:
for a listing of system pushdown functions. Note that not all system functions are listed as some functions will use a common name such as CONCAT vs. the || operator, and other functions will be rewritten and not pushed down, such as SPACE. Note: User defined functions should be specified fully qualified.
-
supportsAggregatesEnhancedNumeric
public boolean supportsAggregatesEnhancedNumeric()
Description copied from class:ExecutionFactory
Support indicates connector can accept STDDEV_POP, STDDEV_VAR, VAR_POP, VAR_SAMP- Overrides:
supportsAggregatesEnhancedNumeric
in classExecutionFactory<DataSource,Connection>
-
supportsElementaryOlapOperations
public boolean supportsElementaryOlapOperations()
- Overrides:
supportsElementaryOlapOperations
in classExecutionFactory<DataSource,Connection>
- Returns:
- true if Elementary OLAP operations are supported including window functions and inline window specifications that include simple expressions in partitioning and ordering
-
supportsGroupByRollup
public boolean supportsGroupByRollup()
- Overrides:
supportsGroupByRollup
in classExecutionFactory<DataSource,Connection>
- Returns:
- true if the translator support GROUP BY ROLLUP
-
getSupportedJoinCriteria
public ExecutionFactory.SupportedJoinCriteria getSupportedJoinCriteria()
Description copied from class:ExecutionFactory
Get the supported join criteria. A null return value will be treated asExecutionFactory.SupportedJoinCriteria.ANY
- Overrides:
getSupportedJoinCriteria
in classExecutionFactory<DataSource,Connection>
-
useParensForJoins
public boolean useParensForJoins()
Description copied from class:JDBCExecutionFactory
Set to true to indicate that every branch of a join should have parenthesis.- Overrides:
useParensForJoins
in classJDBCExecutionFactory
- Returns:
- true if every branch of a join should use parenthesis
-
translateLiteralDate
public String translateLiteralDate(Date dateValue)
Description copied from class:JDBCExecutionFactory
Subclasses should override this method to provide a different sql translation of the literal date value. By default, a date literal is represented as:{d '2002-12-31'}
- Overrides:
translateLiteralDate
in classJDBCExecutionFactory
- Parameters:
dateValue
- Date value, never null- Returns:
- Translated string
-
requiresLeftLinearJoin
public boolean requiresLeftLinearJoin()
- Overrides:
requiresLeftLinearJoin
in classBaseHiveExecutionFactory
-
supportsIsDistinctCriteria
public boolean supportsIsDistinctCriteria()
Description copied from class:ExecutionFactory
Support indicates connector accepts criteria of form (exp1 IS DISTINCT exp2)- Overrides:
supportsIsDistinctCriteria
in classExecutionFactory<DataSource,Connection>
-
usesDatabaseVersion
protected boolean usesDatabaseVersion()
- Overrides:
usesDatabaseVersion
in classJDBCExecutionFactory
-
-