Package org.teiid.translator.solr
Class SolrExecutionFactory
- java.lang.Object
-
- org.teiid.translator.ExecutionFactory<ConnectionFactory,SolrConnection>
-
- org.teiid.translator.solr.SolrExecutionFactory
-
@Translator(name="solr", description="A translator for Solr search platform") public class SolrExecutionFactory extends ExecutionFactory<ConnectionFactory,SolrConnection>
-
-
Nested Class Summary
-
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 protected Map<String,FunctionModifier>
functionModifiers
-
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 SolrExecutionFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
convertFromSolrType(Object value, Class<?> expectedType)
ResultSetExecution
createResultSetExecution(QueryExpression command, ExecutionContext executionContext, RuntimeMetadata metadata, SolrConnection connection)
UpdateExecution
createUpdateExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, SolrConnection connection)
List<String>
getDefaultSupportedFunctions()
Map<String,FunctionModifier>
getFunctionModifiers()
MetadataProcessor<SolrConnection>
getMetadataProcessor()
Get a MetadataProcessor for the translator to read the metadata.List<String>
getSupportedFunctions()
Get list of all supported function names.void
registerFunctionModifier(String name, FunctionModifier modifier)
boolean
returnsSingleUpdateCount()
True if only a single value is returned for the update count.void
start()
Initialize the connector with supplied configurationboolean
supportsAggregatesCountStar()
Support indicates connector can accept the COUNT(*) aggregate functionboolean
supportsBulkUpdate()
Whether the source supports updates with multiple value setsboolean
supportsCompareCriteriaEquals()
Support indicates connector accepts criteria of form (element = constant)boolean
supportsCompareCriteriaOrdered()
Support indicates connector accepts criteria of form (element <=|>= constant)
The query engine will may pushdown queries containing < or > if NOT is also supported.boolean
supportsInCriteria()
Support indicates connector accepts criteria of form (element IN set)boolean
supportsLikeCriteria()
Support indicates connector accepts criteria of form (element LIKE constant)boolean
supportsNotCriteria()
Support indicates connector accepts logical criteria NOTboolean
supportsOnlyLiteralComparison()
boolean
supportsOrCriteria()
Support indicates connector accepts logical criteria connected by ORboolean
supportsOrderBy()
Support indicates connector accepts ORDER BY clause, including multiple elements and ascending and descending sorts.boolean
supportsOrderByUnrelated()
Support indicates connector accepts ORDER BY clause with columns not from the selectboolean
supportsRowLimit()
Gets whether the connector can limit the number of rows returned by a query.boolean
supportsSelectExpression()
Support indicates connector can accept expressions other than element symbols in the SELECT clause.-
Methods inherited from class org.teiid.translator.ExecutionFactory
addPushDownFunction, areLobsUsableAfterClose, closeConnection, createDirectExecution, createExecution, createProcedureExecution, getCacheDirective, getCollationLocale, getConnection, getConnection, getDefaultNullOrder, getDirectQueryProcedureName, getExcludedCommonTableExpressionName, getInstance, getLanguageFactory, getMaxDependentInPredicates, getMaxFromGroups, getMaxInCriteriaSize, getMaxProjectedColumns, getMetadata, getNativeQueryProcedureName, getPushDownFunctions, getRequiredLikeEscape, getSupportedJoinCriteria, getTransactionSupport, getTypeFacility, initCapabilities, isCopyLobs, isForkable, isImmutable, isSourceRequired, isSourceRequiredForCapabilities, isSourceRequiredForMetadata, isThreadBound, requiresCriteria, setCollationLocale, setCopyLobs, setDirectQueryProcedureName, setExcludedCommonTableExpressionName, setImmutable, setMaxDependentInPredicates, setMaxInCriteriaSize, setNativeQueryProcedureName, setRequiresCriteria, setSourceRequired, setSourceRequiredForMetadata, setSupportedJoinCriteria, setSupportsDirectQueryProcedure, setSupportsFullOuterJoins, setSupportsInnerJoins, setSupportsNativeQueries, setSupportsOrderBy, setSupportsOuterJoins, setSupportsSelectDistinct, setThreadBound, setTransactionSupport, supportsAdvancedOlapOperations, supportsAggregatesAvg, supportsAggregatesCount, supportsAggregatesCountBig, supportsAggregatesDistinct, supportsAggregatesEnhancedNumeric, supportsAggregatesMax, supportsAggregatesMin, supportsAggregatesSum, supportsAliasedTable, supportsArrayAgg, supportsArrayType, supportsBatchedUpdates, supportsCommonTableExpressions, supportsCompareCriteriaOrderedExclusive, supportsConvert, supportsCorrelatedSubqueries, supportsCorrelatedSubqueryLimit, supportsDependentJoins, supportsDirectQueryProcedure, supportsElementaryOlapOperations, supportsExcept, supportsExistsCriteria, supportsFormatLiteral, supportsFullDependentJoins, supportsFullOuterJoins, supportsFunctionsInGroupBy, supportsGeographyType, supportsGroupBy, supportsGroupByMultipleDistinctAggregates, supportsGroupByRollup, supportsHaving, supportsInCriteriaSubquery, supportsInlineViews, supportsInnerJoins, supportsInsertWithQueryExpression, supportsIntersect, supportsIsDistinctCriteria, supportsIsNullCriteria, supportsLateralJoin, supportsLateralJoinCondition, supportsLikeCriteriaEscapeCharacter, supportsLikeRegex, supportsListAgg, supportsMultipleOpenExecutions, supportsNativeQueries, supportsOnlyCorrelatedSubqueries, supportsOnlyFormatLiterals, supportsOnlyLateralJoinProcedure, supportsOnlyRelationshipStyleJoins, supportsOnlySingleTableGroupBy, supportsOnlyTimestampAddLiteral, supportsOrderByNullOrdering, supportsOrderByWithExtendedGrouping, supportsOuterJoins, supportsPartialFiltering, supportsProcedureParameterExpression, supportsProcedureTable, supportsQuantifiedCompareCriteriaAll, supportsQuantifiedCompareCriteriaSome, supportsRecursiveCommonTableExpressions, supportsRowOffset, supportsScalarSubqueries, supportsScalarSubqueryProjection, supportsSearchedCaseExpressions, supportsSelectDistinct, supportsSelectExpressionArrayType, supportsSelectWithoutFrom, supportsSelfJoins, supportsSetQueryLimitOffset, supportsSetQueryOrderBy, supportsSimilarTo, supportsStringAgg, supportsSubqueryCommonTableExpressions, supportsSubqueryInOn, supportsUnions, supportsUpsert, supportsWindowDistinctAggregates, supportsWindowFrameClause, supportsWindowFunctionCumeDist, supportsWindowFunctionNthValue, supportsWindowFunctionNtile, supportsWindowFunctionPercentRank, supportsWindowOrderByWithAggregates, useAnsiJoin, useBindingsForDependentJoin
-
-
-
-
Field Detail
-
functionModifiers
protected Map<String,FunctionModifier> functionModifiers
-
-
Method Detail
-
start
public void start() throws TranslatorException
Description copied from class:ExecutionFactory
Initialize the connector with supplied configuration- Overrides:
start
in classExecutionFactory<ConnectionFactory,SolrConnection>
- Throws:
TranslatorException
-
getMetadataProcessor
public MetadataProcessor<SolrConnection> getMetadataProcessor()
Description copied from class:ExecutionFactory
Get a MetadataProcessor for the translator to read the metadata. Typically this will return a new instance.- Overrides:
getMetadataProcessor
in classExecutionFactory<ConnectionFactory,SolrConnection>
- Returns:
-
registerFunctionModifier
public void registerFunctionModifier(String name, FunctionModifier modifier)
-
getFunctionModifiers
public Map<String,FunctionModifier> getFunctionModifiers()
-
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 classExecutionFactory<ConnectionFactory,SolrConnection>
- 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.
-
createResultSetExecution
public ResultSetExecution createResultSetExecution(QueryExpression command, ExecutionContext executionContext, RuntimeMetadata metadata, SolrConnection connection) throws TranslatorException
- Overrides:
createResultSetExecution
in classExecutionFactory<ConnectionFactory,SolrConnection>
- Throws:
TranslatorException
-
createUpdateExecution
public UpdateExecution createUpdateExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, SolrConnection connection) throws TranslatorException
- Overrides:
createUpdateExecution
in classExecutionFactory<ConnectionFactory,SolrConnection>
- Throws:
TranslatorException
-
supportsCompareCriteriaEquals
public boolean supportsCompareCriteriaEquals()
Description copied from class:ExecutionFactory
Support indicates connector accepts criteria of form (element = constant)- Overrides:
supportsCompareCriteriaEquals
in classExecutionFactory<ConnectionFactory,SolrConnection>
-
supportsInCriteria
public boolean supportsInCriteria()
Description copied from class:ExecutionFactory
Support indicates connector accepts criteria of form (element IN set)- Overrides:
supportsInCriteria
in classExecutionFactory<ConnectionFactory,SolrConnection>
-
supportsRowLimit
public boolean supportsRowLimit()
Description copied from class:ExecutionFactory
Gets whether the connector can limit the number of rows returned by a query.- Overrides:
supportsRowLimit
in classExecutionFactory<ConnectionFactory,SolrConnection>
-
supportsNotCriteria
public boolean supportsNotCriteria()
Description copied from class:ExecutionFactory
Support indicates connector accepts logical criteria NOT- Overrides:
supportsNotCriteria
in classExecutionFactory<ConnectionFactory,SolrConnection>
-
supportsLikeCriteria
public boolean supportsLikeCriteria()
Description copied from class:ExecutionFactory
Support indicates connector accepts criteria of form (element LIKE constant)- Overrides:
supportsLikeCriteria
in classExecutionFactory<ConnectionFactory,SolrConnection>
-
supportsOrderBy
public boolean supportsOrderBy()
Description copied from class:ExecutionFactory
Support indicates connector accepts ORDER BY clause, including multiple elements and ascending and descending sorts.- Overrides:
supportsOrderBy
in classExecutionFactory<ConnectionFactory,SolrConnection>
-
supportsCompareCriteriaOrdered
public boolean supportsCompareCriteriaOrdered()
Description copied from class:ExecutionFactory
Support indicates connector accepts criteria of form (element <=|>= constant)
The query engine will may pushdown queries containing < or > if NOT is also supported.- Overrides:
supportsCompareCriteriaOrdered
in classExecutionFactory<ConnectionFactory,SolrConnection>
-
supportsOrCriteria
public boolean supportsOrCriteria()
Description copied from class:ExecutionFactory
Support indicates connector accepts logical criteria connected by OR- Overrides:
supportsOrCriteria
in classExecutionFactory<ConnectionFactory,SolrConnection>
-
supportsOnlyLiteralComparison
public boolean supportsOnlyLiteralComparison()
- Overrides:
supportsOnlyLiteralComparison
in classExecutionFactory<ConnectionFactory,SolrConnection>
- Returns:
- true if only Literal comparisons (equality, ordered, like, etc.) are supported for non-join conditions.
-
supportsOrderByUnrelated
public boolean supportsOrderByUnrelated()
Description copied from class:ExecutionFactory
Support indicates connector accepts ORDER BY clause with columns not from the select- Overrides:
supportsOrderByUnrelated
in classExecutionFactory<ConnectionFactory,SolrConnection>
- Returns:
-
supportsSelectExpression
public boolean supportsSelectExpression()
Description copied from class:ExecutionFactory
Support indicates connector can accept expressions other than element symbols in the SELECT clause. Specific supports for the expression type are still checked.- Overrides:
supportsSelectExpression
in classExecutionFactory<ConnectionFactory,SolrConnection>
-
supportsBulkUpdate
public boolean supportsBulkUpdate()
Description copied from class:ExecutionFactory
Whether the source supports updates with multiple value sets- Overrides:
supportsBulkUpdate
in classExecutionFactory<ConnectionFactory,SolrConnection>
-
supportsAggregatesCountStar
public boolean supportsAggregatesCountStar()
Description copied from class:ExecutionFactory
Support indicates connector can accept the COUNT(*) aggregate function- Overrides:
supportsAggregatesCountStar
in classExecutionFactory<ConnectionFactory,SolrConnection>
-
returnsSingleUpdateCount
public boolean returnsSingleUpdateCount()
Description copied from class:ExecutionFactory
True if only a single value is returned for the update count. This overrides the default expectation of an update count array for bulk/batch commands. It is expected that every command is successful.- Overrides:
returnsSingleUpdateCount
in classExecutionFactory<ConnectionFactory,SolrConnection>
- Returns:
-
-