public class BaseHiveExecutionFactory extends JDBCExecutionFactory
JDBCExecutionFactory.StructRetrievalExecutionFactory.Format, ExecutionFactory.NullOrder, ExecutionFactory.SupportedJoinCriteria, ExecutionFactory.TransactionSupport| Modifier and Type | Field and Description |
|---|---|
protected ConvertModifier |
convert |
protected boolean |
useDatabaseMetaData |
DEFAULT_MAX_DEPENDENT_PREDICATES, DEFAULT_MAX_IN_CRITERIA, DEFAULT_TIME_ZONE, dialectDEFAULT_MAX_FROM_GROUPS, DEFAULT_MAX_IN_CRITERIA_SIZE, DEFAULT_MAX_PROJECTED_COLUMNS| Constructor and Description |
|---|
BaseHiveExecutionFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected FunctionMethod |
addAggregatePushDownFunction(String qualifier,
String name,
String returnType,
String... paramTypes) |
boolean |
addSourceComment()
Returns true to indicate that SQL should include a comment
indicating the session and request ids.
|
void |
bindValue(PreparedStatement stmt,
Object param,
Class<?> paramType,
int i)
Sets prepared statement parameter i with param.
|
protected JDBCMetadataProcessor |
createMetadataProcessor()
Deprecated.
|
ProcedureExecution |
createProcedureExecution(Call command,
ExecutionContext executionContext,
RuntimeMetadata metadata,
Connection conn) |
JDBCUpdateExecution |
createUpdateExecution(Command command,
ExecutionContext executionContext,
RuntimeMetadata metadata,
Connection conn) |
String |
getLikeRegexString()
Get the predicate name for LIKE_REGEX
|
JDBCMetadataProcessor |
getMetadataProcessor()
Get a MetadataProcessor for the translator to read the metadata.
|
SQLConversionVisitor |
getSQLConversionVisitor()
Create the
SQLConversionVisitor that will perform translation. |
boolean |
hasTimeType()
Return false to indicate that time support should be emulated
with timestamps.
|
boolean |
isUseDatabaseMetaData() |
boolean |
requiresLeftLinearJoin() |
Object |
retrieveValue(CallableStatement results,
int parameterIndex,
Class<?> expectedType)
Retrieve the value for the given parameter index
|
Object |
retrieveValue(ResultSet results,
int columnIndex,
Class<?> expectedType)
Retrieve the value on the current resultset row for the given column index.
|
boolean |
rewriteBooleanFunctions() |
void |
setUseDatabaseMetaData(boolean useDatabaseMetaData) |
boolean |
supportsBatchedUpdates()
Whether the source supports
BatchedUpdates |
boolean |
supportsBulkUpdate()
Whether the source supports updates with multiple value sets
|
boolean |
supportsCommonTableExpressions() |
boolean |
supportsConvert(int fromType,
int toType)
Used for fine grained control of convert/cast pushdown.
|
boolean |
supportsCorrelatedSubqueries()
Support indicates connector can accept correlated subqueries wherever subqueries
are accepted
|
boolean |
supportsExcept()
Support indicates that the connector supports the EXCEPT of two queries.
|
boolean |
supportsExistsCriteria()
Support indicates connector accepts the EXISTS criteria
|
boolean |
supportsHaving()
Whether the source supports the HAVING clause
|
boolean |
supportsInCriteriaSubquery()
Support indicates connector accepts IN criteria with a subquery on the right side
|
boolean |
supportsInlineViews()
Support indicates connector can accept inline views (subqueries
in the FROM clause).
|
boolean |
supportsInsertWithQueryExpression()
|
boolean |
supportsIntersect()
Support indicates that the connector supports the INTERSECT of two queries.
|
boolean |
supportsLikeCriteriaEscapeCharacter()
Support indicates connector accepts criteria of form (element LIKE constant ESCAPE char)
|
boolean |
supportsLikeRegex() |
boolean |
supportsOrderByUnrelated()
Support indicates connector accepts ORDER BY clause with columns not from the select
|
boolean |
supportsQuantifiedCompareCriteriaAll()
Support indicates connector accepts the quantified comparison criteria that
use ALL
|
boolean |
supportsQuantifiedCompareCriteriaSome()
Support indicates connector accepts the quantified comparison criteria that
use SOME
|
boolean |
supportsRowLimit()
Gets whether the connector can limit the number of rows returned by a query.
|
boolean |
supportsScalarSubqueries()
Support indicates connector can accept scalar subqueries in the SELECT, WHERE, and
HAVING clauses
|
boolean |
supportsUnions()
Support indicates that the connector supports the UNION of two queries.
|
boolean |
supportsWindowFunctionNthValue() |
List<?> |
translateCommand(Command command,
ExecutionContext context)
Return a List of translated parts (
LanguageObjects and Objects), or null
if to rely on the default translation. |
List<?> |
translateLimit(Limit limit,
ExecutionContext context)
Return a List of translated parts (
LanguageObjects and Objects), or null
if to rely on the default translation. |
String |
translateLiteralBoolean(Boolean booleanValue)
Subclasses should override this method to provide a different sql translation
of the literal boolean value.
|
String |
translateLiteralTime(Time timeValue)
Subclasses should override this method to provide a different sql translation
of the literal time value.
|
String |
translateLiteralTimestamp(Timestamp timestampValue)
Subclasses should override this method to provide a different sql translation
of the literal timestamp value.
|
boolean |
useAnsiJoin()
Whether the source prefers to use ANSI style joins.
|
boolean |
useAsInGroupAlias()
Indicates whether group alias should be of the form
"...FROM groupA AS X" or "...FROM groupA X".
|
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, getSupportedFunctions, getTemporaryTableName, getTimestampNanoPrecision, getVersion, initCapabilities, intializeConnectionAfterCancel, isEnableDependentJoins, isExtendedAscii, isNonAscii, isNonAscii, isNonAsciiFunction, isSourceRequired, isSourceRequiredForCapabilities, isTrimStrings, loadedTemporaryTable, obtainedConnection, parseName, registerFunctionModifier, registerSpecificTypeOfOutParameter, replaceElementName, retrieveGeographyValue, retrieveGeographyValue, retrieveGeometryValue, retrieveGeometryValue, setCommentFormat, setDatabaseTimeZone, setDatabaseVersion, setDatabaseVersion, setEnableDependentJoins, setFetchSize, setMaxPreparedInsertBatchSize, setRemovePushdownCharacters, setStructRetrieval, setTrimStrings, setUseBindingsForDependentJoin, setUseBindVariables, setUseCommentsInSourceQuery, start, supportsAggregatesAvg, supportsAggregatesCount, supportsAggregatesCountStar, supportsAggregatesDistinct, supportsAggregatesMax, supportsAggregatesMin, supportsAggregatesSum, supportsAliasedTable, supportsBooleanExpressions, supportsCompareCriteriaEquals, supportsCompareCriteriaOrdered, supportsDependentJoins, supportsFullDependentJoins, supportsGeneratedKeys, supportsGeneratedKeys, supportsGroupBy, supportsInCriteria, supportsIsNullCriteria, supportsLikeCriteria, supportsNotCriteria, supportsOrCriteria, supportsSearchedCaseExpressions, supportsSelectExpression, supportsSelfJoins, supportsSetQueryOrderBy, tempTableRequiresTransaction, translate, translateGeographyLiteral, translateGeographyParameter, translateGeographySelect, translateGeometryLiteral, translateGeometryParameter, translateGeometrySelect, translateLiteralBinaryType, translateLiteralDate, useBindingsForDependentJoin, useBindVariables, useColumnNamesForGeneratedKeys, useCommentsInSourceQuery, useParensForJoins, useParensForSetQueries, usePreparedStatements, useScientificNotation, usesDatabaseVersion, useSelectLimit, useStreamsForLobs, useUnicodePrefix, useWithRollupaddPushDownFunction, areLobsUsableAfterClose, createExecution, getCacheDirective, getCollationLocale, getConnection, getDirectQueryProcedureName, getExcludedCommonTableExpressionName, getInstance, getLanguageFactory, getMaxDependentInPredicates, getMaxFromGroups, getMaxInCriteriaSize, getMaxProjectedColumns, getNativeQueryProcedureName, getPushDownFunctions, getRequiredLikeEscape, getSupportedJoinCriteria, 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, supportsAggregatesEnhancedNumeric, supportsArrayAgg, supportsArrayType, supportsCompareCriteriaOrderedExclusive, supportsCorrelatedSubqueryLimit, supportsDirectQueryProcedure, supportsElementaryOlapOperations, supportsFormatLiteral, supportsFullOuterJoins, supportsFunctionsInGroupBy, supportsGeographyType, supportsGroupByMultipleDistinctAggregates, supportsGroupByRollup, supportsInnerJoins, supportsIsDistinctCriteria, supportsLateralJoin, supportsLateralJoinCondition, supportsListAgg, supportsMultipleOpenExecutions, supportsNativeQueries, supportsOnlyCorrelatedSubqueries, supportsOnlyFormatLiterals, supportsOnlyLateralJoinProcedure, supportsOnlyLiteralComparison, 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, supportsWindowOrderByWithAggregatesprotected ConvertModifier convert
protected boolean useDatabaseMetaData
public JDBCUpdateExecution createUpdateExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, Connection conn) throws TranslatorException
createUpdateExecution in class JDBCExecutionFactoryTranslatorExceptionpublic ProcedureExecution createProcedureExecution(Call command, ExecutionContext executionContext, RuntimeMetadata metadata, Connection conn) throws TranslatorException
createProcedureExecution in class JDBCExecutionFactoryTranslatorExceptionpublic SQLConversionVisitor getSQLConversionVisitor()
JDBCExecutionFactorySQLConversionVisitor that will perform translation. Typical custom
JDBC connectors will not need to create custom conversion visitors, rather implementors
should override existing JDBCExecutionFactory methods.getSQLConversionVisitor in class JDBCExecutionFactorySQLConversionVisitorpublic boolean useAnsiJoin()
ExecutionFactoryuseAnsiJoin in class ExecutionFactory<DataSource,Connection>public boolean supportsCorrelatedSubqueries()
ExecutionFactorysupportsCorrelatedSubqueries in class JDBCExecutionFactorypublic boolean supportsExistsCriteria()
ExecutionFactorysupportsExistsCriteria in class JDBCExecutionFactorypublic boolean supportsInCriteriaSubquery()
ExecutionFactorysupportsInCriteriaSubquery in class JDBCExecutionFactorypublic boolean supportsLikeCriteriaEscapeCharacter()
ExecutionFactorysupportsLikeCriteriaEscapeCharacter in class JDBCExecutionFactorypublic boolean supportsQuantifiedCompareCriteriaAll()
ExecutionFactorysupportsQuantifiedCompareCriteriaAll in class JDBCExecutionFactorypublic boolean supportsQuantifiedCompareCriteriaSome()
ExecutionFactorysupportsQuantifiedCompareCriteriaSome in class JDBCExecutionFactorypublic boolean supportsBulkUpdate()
ExecutionFactorysupportsBulkUpdate in class JDBCExecutionFactorypublic boolean supportsBatchedUpdates()
ExecutionFactoryBatchedUpdatessupportsBatchedUpdates in class JDBCExecutionFactorypublic List<?> translateCommand(Command command, ExecutionContext context)
JDBCExecutionFactoryLanguageObjects and Objects), or null
if to rely on the default translation.translateCommand in class JDBCExecutionFactorypublic List<?> translateLimit(Limit limit, ExecutionContext context)
JDBCExecutionFactoryLanguageObjects and Objects), or null
if to rely on the default translation.translateLimit in class JDBCExecutionFactorypublic boolean addSourceComment()
JDBCExecutionFactoryaddSourceComment in class JDBCExecutionFactorypublic boolean useAsInGroupAlias()
JDBCExecutionFactoryuseAsInGroupAlias in class JDBCExecutionFactorypublic boolean hasTimeType()
JDBCExecutionFactoryhasTimeType in class JDBCExecutionFactorypublic String getLikeRegexString()
JDBCExecutionFactorygetLikeRegexString in class JDBCExecutionFactorypublic boolean supportsScalarSubqueries()
ExecutionFactorysupportsScalarSubqueries in class JDBCExecutionFactorypublic boolean supportsInlineViews()
ExecutionFactorysupportsInlineViews in class JDBCExecutionFactorypublic boolean supportsUnions()
ExecutionFactorysupportsUnions in class JDBCExecutionFactorypublic boolean supportsInsertWithQueryExpression()
ExecutionFactorySetQuery or SelectsupportsInsertWithQueryExpression in class JDBCExecutionFactorypublic boolean supportsIntersect()
ExecutionFactorysupportsIntersect in class ExecutionFactory<DataSource,Connection>public boolean supportsExcept()
ExecutionFactorysupportsExcept in class ExecutionFactory<DataSource,Connection>public boolean supportsCommonTableExpressions()
supportsCommonTableExpressions in class ExecutionFactory<DataSource,Connection>public boolean supportsRowLimit()
ExecutionFactorysupportsRowLimit in class ExecutionFactory<DataSource,Connection>public String translateLiteralBoolean(Boolean booleanValue)
JDBCExecutionFactory'0' or '1'.translateLiteralBoolean in class JDBCExecutionFactorybooleanValue - Boolean value, never nullpublic String translateLiteralTime(Time timeValue)
JDBCExecutionFactory{t '23:59:59'}
See JDBCExecutionFactory.hasTimeType() to represent literal times as timestamps.translateLiteralTime in class JDBCExecutionFactorytimeValue - Time value, never nullpublic String translateLiteralTimestamp(Timestamp timestampValue)
JDBCExecutionFactory{ts '2002-12-31 23:59:59'}.
See JDBCExecutionFactory.getTimestampNanoPrecision() to control the literal
precision.translateLiteralTimestamp in class JDBCExecutionFactorytimestampValue - Timestamp value, never null@Deprecated protected JDBCMetadataProcessor createMetadataProcessor()
createMetadataProcessor in class JDBCExecutionFactorygetMetadataProcessorpublic JDBCMetadataProcessor getMetadataProcessor()
ExecutionFactorygetMetadataProcessor in class JDBCExecutionFactorypublic Object retrieveValue(ResultSet results, int columnIndex, Class<?> expectedType) throws SQLException
JDBCExecutionFactoryretrieveValue in class JDBCExecutionFactorySQLExceptionpublic Object retrieveValue(CallableStatement results, int parameterIndex, Class<?> expectedType) throws SQLException
JDBCExecutionFactoryretrieveValue in class JDBCExecutionFactorySQLExceptionpublic void bindValue(PreparedStatement stmt, Object param, Class<?> paramType, int i) throws SQLException
JDBCExecutionFactorybindValue in class JDBCExecutionFactorySQLExceptionprotected FunctionMethod addAggregatePushDownFunction(String qualifier, String name, String returnType, String... paramTypes)
public boolean supportsHaving()
ExecutionFactorysupportsHaving in class JDBCExecutionFactorypublic boolean supportsConvert(int fromType,
int toType)
ExecutionFactoryExecutionFactory.getSupportedFunctions() should
contain SourceSystemFunctions.CONVERT. This method can then return false to indicate
a lack of specific support. The engine will does not care about an unnecessary conversion
where fromType == toType.
By default lob conversion is disabled.supportsConvert in class ExecutionFactory<DataSource,Connection>fromType - @see RUNTIME_CODEStoType - @see RUNTIME_CODES@TranslatorProperty(display="Use DatabaseMetaData", description="Use DatabaseMetaData (typical JDBC logic) for importing") public boolean isUseDatabaseMetaData()
public void setUseDatabaseMetaData(boolean useDatabaseMetaData)
public boolean requiresLeftLinearJoin()
public boolean supportsOrderByUnrelated()
ExecutionFactorysupportsOrderByUnrelated in class JDBCExecutionFactorypublic boolean supportsLikeRegex()
supportsLikeRegex in class ExecutionFactory<DataSource,Connection>public boolean rewriteBooleanFunctions()
public boolean supportsWindowFunctionNthValue()
supportsWindowFunctionNthValue in class ExecutionFactory<DataSource,Connection>ExecutionFactory.supportsElementaryOlapOperations()Copyright © 2019. All rights reserved.