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 StringHIVEstatic VersionV_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.SupportedJoinCriteriagetSupportedJoinCriteria()Get the supported join criteria.booleanrequiresLeftLinearJoin()voidstart()Initialize the connector with supplied configurationbooleansupportsAggregatesEnhancedNumeric()Support indicates connector can accept STDDEV_POP, STDDEV_VAR, VAR_POP, VAR_SAMPbooleansupportsElementaryOlapOperations()booleansupportsGroupByRollup()booleansupportsIsDistinctCriteria()Support indicates connector accepts criteria of form (exp1 IS DISTINCT exp2)StringtranslateLiteralDate(Date dateValue)Subclasses should override this method to provide a different sql translation of the literal date value.booleanuseParensForJoins()Set to true to indicate that every branch of a join should have parenthesis.protected booleanusesDatabaseVersion()-
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 TranslatorExceptionDescription copied from class:ExecutionFactoryInitialize the connector with supplied configuration- Overrides:
startin classJDBCExecutionFactory- Throws:
TranslatorException
-
getSupportedFunctions
public List<String> getSupportedFunctions()
Description copied from class:ExecutionFactoryGet list of all supported function names. Arithmetic functions have names like "+".- Overrides:
getSupportedFunctionsin 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:ExecutionFactorySupport indicates connector can accept STDDEV_POP, STDDEV_VAR, VAR_POP, VAR_SAMP- Overrides:
supportsAggregatesEnhancedNumericin classExecutionFactory<DataSource,Connection>
-
supportsElementaryOlapOperations
public boolean supportsElementaryOlapOperations()
- Overrides:
supportsElementaryOlapOperationsin 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:
supportsGroupByRollupin classExecutionFactory<DataSource,Connection>- Returns:
- true if the translator support GROUP BY ROLLUP
-
getSupportedJoinCriteria
public ExecutionFactory.SupportedJoinCriteria getSupportedJoinCriteria()
Description copied from class:ExecutionFactoryGet the supported join criteria. A null return value will be treated asExecutionFactory.SupportedJoinCriteria.ANY- Overrides:
getSupportedJoinCriteriain classExecutionFactory<DataSource,Connection>
-
useParensForJoins
public boolean useParensForJoins()
Description copied from class:JDBCExecutionFactorySet to true to indicate that every branch of a join should have parenthesis.- Overrides:
useParensForJoinsin classJDBCExecutionFactory- Returns:
- true if every branch of a join should use parenthesis
-
translateLiteralDate
public String translateLiteralDate(Date dateValue)
Description copied from class:JDBCExecutionFactorySubclasses 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:
translateLiteralDatein classJDBCExecutionFactory- Parameters:
dateValue- Date value, never null- Returns:
- Translated string
-
requiresLeftLinearJoin
public boolean requiresLeftLinearJoin()
- Overrides:
requiresLeftLinearJoinin classBaseHiveExecutionFactory
-
supportsIsDistinctCriteria
public boolean supportsIsDistinctCriteria()
Description copied from class:ExecutionFactorySupport indicates connector accepts criteria of form (exp1 IS DISTINCT exp2)- Overrides:
supportsIsDistinctCriteriain classExecutionFactory<DataSource,Connection>
-
usesDatabaseVersion
protected boolean usesDatabaseVersion()
- Overrides:
usesDatabaseVersionin classJDBCExecutionFactory
-
-