|
Teiid 8.3.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.teiid.translator.ExecutionFactory<DataSource,Connection>
org.teiid.translator.jdbc.JDBCExecutionFactory
org.teiid.translator.hive.HiveExecutionFactory
@Translator(name="hive",
description="A translator for hive based database on HDFS")
public class HiveExecutionFactory
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.teiid.translator.ExecutionFactory |
|---|
ExecutionFactory.Format, ExecutionFactory.NullOrder, ExecutionFactory.SupportedJoinCriteria |
| Field Summary | |
|---|---|
protected ConvertModifier |
convert
|
static String |
HIVE
|
| Fields inherited from class org.teiid.translator.jdbc.JDBCExecutionFactory |
|---|
DEFAULT_MAX_DEPENDENT_PREDICATES, DEFAULT_MAX_IN_CRITERIA, DEFAULT_TIME_ZONE |
| Fields inherited from class org.teiid.translator.ExecutionFactory |
|---|
DEFAULT_MAX_FROM_GROUPS, DEFAULT_MAX_IN_CRITERIA_SIZE |
| Constructor Summary | |
|---|---|
HiveExecutionFactory()
|
|
| Method Summary | |
|---|---|
boolean |
addSourceComment()
Returns true to indicate that SQL should include a comment indicating the session and request ids. |
String |
getLikeRegexString()
Get the predicate name for LIKE_REGEX |
void |
getMetadata(MetadataFactory metadataFactory,
Connection conn)
Implement to provide metadata to the metadata for use by the engine. |
SQLConversionVisitor |
getSQLConversionVisitor()
Create the SQLConversionVisitor that will perform translation. |
List<String> |
getSupportedFunctions()
Get list of all supported function names. |
boolean |
hasTimeType()
Return false to indicate that time support should be emulated with timestamps. |
void |
start()
Initialize the connector with supplied configuration |
boolean |
supportsAggregatesEnhancedNumeric()
Support indicates connector can accept STDDEV_POP, STDDEV_VAR, VAR_POP, VAR_SAMP |
boolean |
supportsBatchedUpdates()
Whether the source supports BatchedUpdates |
boolean |
supportsBulkUpdate()
Whether the source supports updates with multiple value sets |
boolean |
supportsCommonTableExpressions()
|
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 |
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()
Support indicates that the connector can accept INSERTs with values specified by a SetQuery or Select |
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 |
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 |
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 ( 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 |
translateLiteralDate(Date dateValue)
Subclasses should override this method to provide a different sql translation of the literal date 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". |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static String HIVE
protected ConvertModifier convert
| Constructor Detail |
|---|
public HiveExecutionFactory()
| Method Detail |
|---|
public void start()
throws TranslatorException
ExecutionFactory
start 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()
ExecutionFactory
useAnsiJoin in class ExecutionFactory<DataSource,Connection>public boolean supportsCorrelatedSubqueries()
ExecutionFactory
supportsCorrelatedSubqueries in class JDBCExecutionFactorypublic boolean supportsExistsCriteria()
ExecutionFactory
supportsExistsCriteria in class JDBCExecutionFactorypublic boolean supportsInCriteriaSubquery()
ExecutionFactory
supportsInCriteriaSubquery in class JDBCExecutionFactorypublic boolean supportsLikeCriteriaEscapeCharacter()
ExecutionFactory
supportsLikeCriteriaEscapeCharacter in class JDBCExecutionFactorypublic boolean supportsQuantifiedCompareCriteriaAll()
ExecutionFactory
supportsQuantifiedCompareCriteriaAll in class JDBCExecutionFactorypublic boolean supportsQuantifiedCompareCriteriaSome()
ExecutionFactory
supportsQuantifiedCompareCriteriaSome in class JDBCExecutionFactorypublic boolean supportsBulkUpdate()
ExecutionFactory
supportsBulkUpdate in class JDBCExecutionFactorypublic boolean supportsBatchedUpdates()
ExecutionFactoryBatchedUpdates
supportsBatchedUpdates in class JDBCExecutionFactory
public List<?> translateCommand(Command command,
ExecutionContext context)
JDBCExecutionFactoryLanguageObjects and Objects), or null
if to rely on the default translation.
translateCommand in class JDBCExecutionFactory
public List<?> translateLimit(Limit limit,
ExecutionContext context)
JDBCExecutionFactoryLanguageObjects and Objects), or null
if to rely on the default translation.
translateLimit in class JDBCExecutionFactorypublic boolean addSourceComment()
JDBCExecutionFactory
addSourceComment in class JDBCExecutionFactorypublic boolean useAsInGroupAlias()
JDBCExecutionFactory
useAsInGroupAlias in class JDBCExecutionFactorypublic boolean hasTimeType()
JDBCExecutionFactory
hasTimeType in class JDBCExecutionFactorypublic String getLikeRegexString()
JDBCExecutionFactory
getLikeRegexString in class JDBCExecutionFactorypublic boolean supportsScalarSubqueries()
ExecutionFactory
supportsScalarSubqueries in class JDBCExecutionFactorypublic boolean supportsInlineViews()
ExecutionFactory
supportsInlineViews in class JDBCExecutionFactorypublic boolean supportsUnions()
ExecutionFactory
supportsUnions in class JDBCExecutionFactorypublic boolean supportsInsertWithQueryExpression()
ExecutionFactorySetQuery or Select
supportsInsertWithQueryExpression in class JDBCExecutionFactorypublic boolean supportsIntersect()
ExecutionFactory
supportsIntersect in class ExecutionFactory<DataSource,Connection>public boolean supportsExcept()
ExecutionFactory
supportsExcept in class ExecutionFactory<DataSource,Connection>public boolean supportsAggregatesEnhancedNumeric()
ExecutionFactory
supportsAggregatesEnhancedNumeric in class ExecutionFactory<DataSource,Connection>public boolean supportsCommonTableExpressions()
supportsCommonTableExpressions in class ExecutionFactory<DataSource,Connection>public String translateLiteralBoolean(Boolean booleanValue)
JDBCExecutionFactory'0' or '1'.
translateLiteralBoolean in class JDBCExecutionFactorybooleanValue - Boolean value, never null
public String translateLiteralDate(Date dateValue)
JDBCExecutionFactory{d '2002-12-31'}
translateLiteralDate in class JDBCExecutionFactorydateValue - Date value, never null
public 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 null
public 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
public List<String> getSupportedFunctions()
ExecutionFactory
getSupportedFunctions in class JDBCExecutionFactoryfor 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.
public void getMetadata(MetadataFactory metadataFactory,
Connection conn)
throws TranslatorException
ExecutionFactory
getMetadata in class JDBCExecutionFactoryconn - may be null if the source is not required
TranslatorException - to indicate a recoverable error, otherwise a RuntimeExceptionExecutionFactory.isSourceRequiredForMetadata()
|
Teiid 8.3.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||