public class BaseHiveExecutionFactory extends JDBCExecutionFactory
JDBCExecutionFactory.StructRetrieval
ExecutionFactory.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, dialect
DEFAULT_MAX_FROM_GROUPS, DEFAULT_MAX_IN_CRITERIA_SIZE
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 JDBCMetdataProcessor |
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
|
JDBCMetdataProcessor |
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.
|
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 |
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.
|
List<?> |
translateCommand(Command command,
ExecutionContext context)
Return a List of translated parts (
LanguageObject s and Objects), or null
if to rely on the default translation. |
List<?> |
translateLimit(Limit limit,
ExecutionContext context)
Return a List of translated parts (
LanguageObject s 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, getSetOperationString, getSourceComment, getStructRetrieval, getSupportedFunctions, getTemporaryTableName, getTimestampNanoPrecision, getVersion, initCapabilities, intializeConnectionAfterCancel, isEnableDependentJoins, isSourceRequired, isSourceRequiredForCapabilities, isTrimStrings, loadedTemporaryTable, obtainedConnection, parseName, registerFunctionModifier, registerSpecificTypeOfOutParameter, replaceElementName, retrieveGeometryValue, retrieveGeometryValue, setCommentFormat, setDatabaseTimeZone, setDatabaseVersion, setDatabaseVersion, setEnableDependentJoins, setFetchSize, setMaxPreparedInsertBatchSize, setStructRetrieval, setTrimStrings, setUseBindingsForDependentJoin, setUseBindVariables, setUseCommentsInSourceQuery, start, supportsAggregatesAvg, supportsAggregatesCount, supportsAggregatesCountStar, supportsAggregatesDistinct, supportsAggregatesMax, supportsAggregatesMin, supportsAggregatesSum, supportsAliasedTable, supportsCompareCriteriaEquals, supportsCompareCriteriaOrdered, supportsDependentJoins, supportsFullDependentJoins, supportsGeneratedKeys, supportsGeneratedKeys, supportsGroupBy, supportsInCriteria, supportsIsNullCriteria, supportsLikeCriteria, supportsNotCriteria, supportsOrCriteria, supportsSearchedCaseExpressions, supportsSelectExpression, supportsSelfJoins, supportsSetQueryOrderBy, tempTableRequiresTransaction, translate, translateGeometryLiteral, translateGeometrySelect, translateLiteralBinaryType, translateLiteralDate, useBindingsForDependentJoin, useBindVariables, useColumnNamesForGeneratedKeys, useCommentsInSourceQuery, useParensForJoins, useParensForSetQueries, usePreparedStatements, useScientificNotation, usesDatabaseVersion, useSelectLimit, useStreamsForLobs, useUnicodePrefix, useWithRollup
addPushDownFunction, areLobsUsableAfterClose, createExecution, getCacheDirective, getCollationLocale, getConnection, getDirectQueryProcedureName, getExcludedCommonTableExpressionName, getInstance, getLanguageFactory, getMaxDependentInPredicates, getMaxFromGroups, getMaxInCriteriaSize, 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, supportsAggregatesEnhancedNumeric, supportsArrayAgg, supportsArrayType, supportsCompareCriteriaOrderedExclusive, supportsCorrelatedSubqueryLimit, supportsDirectQueryProcedure, supportsElementaryOlapOperations, supportsFormatLiteral, supportsFullOuterJoins, supportsFunctionsInGroupBy, supportsGroupByMultipleDistinctAggregates, supportsGroupByRollup, supportsInnerJoins, supportsLateralJoin, supportsLateralJoinCondition, supportsLikeRegex, supportsNativeQueries, supportsOnlyCorrelatedSubqueries, supportsOnlyFormatLiterals, supportsOnlyLiteralComparison, supportsOnlySingleTableGroupBy, supportsOrderBy, supportsOrderByNullOrdering, supportsOrderByWithExtendedGrouping, supportsOuterJoins, supportsPartialFiltering, supportsProcedureTable, supportsRecursiveCommonTableExpressions, supportsRowOffset, supportsScalarSubqueryProjection, supportsSelectDistinct, supportsSelectWithoutFrom, supportsSimilarTo, supportsStringAgg, supportsSubqueryCommonTableExpressions, supportsSubqueryInOn, supportsUpsert, supportsWindowDistinctAggregates, supportsWindowOrderByWithAggregates
protected ConvertModifier convert
protected boolean useDatabaseMetaData
public JDBCUpdateExecution createUpdateExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, Connection conn) throws TranslatorException
createUpdateExecution
in class JDBCExecutionFactory
TranslatorException
public ProcedureExecution createProcedureExecution(Call command, ExecutionContext executionContext, RuntimeMetadata metadata, Connection conn) throws TranslatorException
createProcedureExecution
in class JDBCExecutionFactory
TranslatorException
public SQLConversionVisitor getSQLConversionVisitor()
JDBCExecutionFactory
SQLConversionVisitor
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 JDBCExecutionFactory
SQLConversionVisitor
public boolean useAnsiJoin()
ExecutionFactory
useAnsiJoin
in class ExecutionFactory<DataSource,Connection>
public boolean supportsCorrelatedSubqueries()
ExecutionFactory
supportsCorrelatedSubqueries
in class JDBCExecutionFactory
public boolean supportsExistsCriteria()
ExecutionFactory
supportsExistsCriteria
in class JDBCExecutionFactory
public boolean supportsInCriteriaSubquery()
ExecutionFactory
supportsInCriteriaSubquery
in class JDBCExecutionFactory
public boolean supportsLikeCriteriaEscapeCharacter()
ExecutionFactory
supportsLikeCriteriaEscapeCharacter
in class JDBCExecutionFactory
public boolean supportsQuantifiedCompareCriteriaAll()
ExecutionFactory
supportsQuantifiedCompareCriteriaAll
in class JDBCExecutionFactory
public boolean supportsQuantifiedCompareCriteriaSome()
ExecutionFactory
supportsQuantifiedCompareCriteriaSome
in class JDBCExecutionFactory
public boolean supportsBulkUpdate()
ExecutionFactory
supportsBulkUpdate
in class JDBCExecutionFactory
public boolean supportsBatchedUpdates()
ExecutionFactory
BatchedUpdates
supportsBatchedUpdates
in class JDBCExecutionFactory
public List<?> translateCommand(Command command, ExecutionContext context)
JDBCExecutionFactory
LanguageObject
s and Objects), or null
if to rely on the default translation.translateCommand
in class JDBCExecutionFactory
public List<?> translateLimit(Limit limit, ExecutionContext context)
JDBCExecutionFactory
LanguageObject
s and Objects), or null
if to rely on the default translation.translateLimit
in class JDBCExecutionFactory
public boolean addSourceComment()
JDBCExecutionFactory
addSourceComment
in class JDBCExecutionFactory
public boolean useAsInGroupAlias()
JDBCExecutionFactory
useAsInGroupAlias
in class JDBCExecutionFactory
public boolean hasTimeType()
JDBCExecutionFactory
hasTimeType
in class JDBCExecutionFactory
public String getLikeRegexString()
JDBCExecutionFactory
getLikeRegexString
in class JDBCExecutionFactory
public boolean supportsScalarSubqueries()
ExecutionFactory
supportsScalarSubqueries
in class JDBCExecutionFactory
public boolean supportsInlineViews()
ExecutionFactory
supportsInlineViews
in class JDBCExecutionFactory
public boolean supportsUnions()
ExecutionFactory
supportsUnions
in class JDBCExecutionFactory
public boolean supportsInsertWithQueryExpression()
ExecutionFactory
SetQuery
or Select
supportsInsertWithQueryExpression
in class JDBCExecutionFactory
public boolean supportsIntersect()
ExecutionFactory
supportsIntersect
in class ExecutionFactory<DataSource,Connection>
public boolean supportsExcept()
ExecutionFactory
supportsExcept
in class ExecutionFactory<DataSource,Connection>
public boolean supportsCommonTableExpressions()
supportsCommonTableExpressions
in class ExecutionFactory<DataSource,Connection>
public boolean supportsRowLimit()
ExecutionFactory
supportsRowLimit
in class ExecutionFactory<DataSource,Connection>
public String translateLiteralBoolean(Boolean booleanValue)
JDBCExecutionFactory
'0'
or '1'
.translateLiteralBoolean
in class JDBCExecutionFactory
booleanValue
- 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 JDBCExecutionFactory
timeValue
- 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 JDBCExecutionFactory
timestampValue
- Timestamp value, never null@Deprecated protected JDBCMetdataProcessor createMetadataProcessor()
createMetadataProcessor
in class JDBCExecutionFactory
getMetadataProcessor
public JDBCMetdataProcessor getMetadataProcessor()
ExecutionFactory
getMetadataProcessor
in class JDBCExecutionFactory
public Object retrieveValue(ResultSet results, int columnIndex, Class<?> expectedType) throws SQLException
JDBCExecutionFactory
retrieveValue
in class JDBCExecutionFactory
SQLException
public Object retrieveValue(CallableStatement results, int parameterIndex, Class<?> expectedType) throws SQLException
JDBCExecutionFactory
retrieveValue
in class JDBCExecutionFactory
SQLException
public void bindValue(PreparedStatement stmt, Object param, Class<?> paramType, int i) throws SQLException
JDBCExecutionFactory
bindValue
in class JDBCExecutionFactory
SQLException
protected FunctionMethod addAggregatePushDownFunction(String qualifier, String name, String returnType, String... paramTypes)
public boolean supportsHaving()
ExecutionFactory
supportsHaving
in class JDBCExecutionFactory
public boolean supportsConvert(int fromType, int toType)
ExecutionFactory
ExecutionFactory.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()
ExecutionFactory
supportsOrderByUnrelated
in class JDBCExecutionFactory
Copyright © 2016 JBoss by Red Hat. All rights reserved.