|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.farrago.defimpl.FarragoDefaultSessionPersonality
com.lucidera.farrago.LucidDbSessionPersonality
public class LucidDbSessionPersonality
Customizes Farrago session personality with LucidDB behavior.
| Nested Class Summary | |
|---|---|
private static class |
LucidDbSessionPersonality.LucidDbPlanner
|
| Nested classes/interfaces inherited from class net.sf.farrago.defimpl.FarragoDefaultSessionPersonality |
|---|
FarragoDefaultSessionPersonality.ParamValidator |
| Field Summary | |
|---|---|
private boolean |
defaultLucidDb
If true, this session's underlying default personality is LucidDb, as opposed to one that was switched from some other personality to LucidDb. |
private boolean |
enableIndexOnlyScans
If true, enable index only scan rules |
static String |
ERROR_LOG_MAX
|
static String |
ERROR_LOG_MAX_DEFAULT
|
static String |
ERROR_MAX
|
static String |
ERROR_MAX_DEFAULT
|
static String |
ETL_ACTION_ID
|
static String |
ETL_ACTION_ID_DEFAULT
|
static String |
ETL_PROCESS_ID
|
static String |
ETL_PROCESS_ID_DEFAULT
|
static String |
LAST_ROWS_REJECTED
|
static String |
LAST_ROWS_REJECTED_DEFAULT
|
static String |
LAST_UPSERT_ROWS_INSERTED
|
static String |
LAST_UPSERT_ROWS_INSERTED_DEFAULT
|
static String |
LOG_DIR
|
static String[] |
LOG_DIR_DEFAULT
|
static String |
REDUCE_NON_CORRELATED_SUBQUERIES_LUCIDDB_DFLT
|
| Constructor Summary | |
|---|---|
protected |
LucidDbSessionPersonality(FarragoDbSession session,
FarragoSessionPersonality defaultPersonality,
boolean enableIndexOnlyScans)
|
| Method Summary | |
|---|---|
private void |
applyPushDownFilterRules(HepProgramBuilder builder)
Applies rules that push filters past various RelNodes. |
private void |
applyPushDownProjectRules(HepProgramBuilder builder)
Applies rules that push projects past various RelNodes. |
private HepProgram |
createHepProgram(boolean fennelEnabled,
CalcVirtualMachine calcVM,
Collection<RelOptRule> medPluginRules,
boolean alterTable)
|
FarragoSessionVariables |
createInheritedSessionVariables(FarragoSessionVariables variables)
Creates a set of session variables for use in a cloned session. |
String |
getDefaultLocalDataServerName(FarragoSessionStmtValidator stmtValidator)
Gets the name of the local data server to use for tables when none is specified by CREATE TABLE. |
void |
getRowCounts(ResultSet resultSet,
List<Long> rowCounts,
TableModificationRelBase.Operation tableModOp)
Gives this personality the opportunity to retrieve rowcount information returned by a DML operation. |
SqlOperatorTable |
getSqlOperatorTable(FarragoSessionPreparingStmt preparingStmt)
Gets the SQL operator table to use for validating a statement. |
boolean |
isAlterTableAddColumnIncremental()
Tests whether this session personality implements ALTER TABLE ADD COLUMN in an incremental fashion (only adding on the new column as opposed to reformatting existing rows). |
boolean |
isDefaultLucidDbPersonality()
|
void |
loadDefaultSessionVariables(FarragoSessionVariables variables)
Loads variables from the session personality into a session variables object. |
private FarragoSessionPlanner |
newHepPlanner(FarragoSessionPreparingStmt stmt)
|
FarragoSessionPlanner |
newPlanner(FarragoSessionPreparingStmt stmt,
boolean init)
Creates a new planner. |
FarragoSessionPreparingStmt |
newPreparingStmt(FarragoSessionStmtContext stmtContext,
FarragoSessionStmtValidator stmtValidator)
Creates a new preparing statement tied to this session and its underlying database. |
FarragoSessionRuntimeContext |
newRuntimeContext(FarragoSessionRuntimeParams params)
Creates a new runtime context. |
RelDataTypeFactory |
newTypeFactory(FarragoRepos repos)
Creates a new type factory. |
void |
registerRelMetadataProviders(ChainedRelMetadataProvider chain)
Gives this personality a chance to register one or more RelMetadataProviders in the chain which will be used to answer
relational expression metadata queries during optimization. |
void |
resetRowCounts(FemAbstractColumnSet table)
Gives this personality the opportunity to reset rowcount information in the catalog tables for a specified table |
boolean |
shouldReplacePreserveOriginalSql()
Tests whether this personality wants original SQL to be preserved for dependent objects where possible during the revalidation triggered by CREATE OR REPLACE. |
boolean |
supportsFeature(org.eigenbase.resgen.ResourceDefinition feature)
Tests whether a feature is supported in this personality. |
void |
updateIndexRoot(FemLocalIndex index,
FarragoDataWrapperCache wrapperCache,
FarragoSessionIndexMap baseIndexMap,
Long newRoot)
Gives the personality the opportunity to update an index root page when the index is rebuilt |
long |
updateRowCounts(FarragoSession session,
List<String> tableName,
List<Long> rowCounts,
TableModificationRelBase.Operation tableModOp,
FarragoSessionRuntimeContext runningContext)
Gives this personality the opportunity to update rowcount information in the catalog tables for a specified table as a result of a particular DML operation. |
| Methods inherited from class net.sf.farrago.defimpl.FarragoDefaultSessionPersonality |
|---|
addRowCount, defineDdlHandlers, definePlannerListeners, definePrivileges, getOJRexImplementorTable, getRuntimeContextClass, initPreparingStmt, isJavaUdxRestartable, isSupportedType, newComponentImpl, newDdlValidator, newJmiQueryProcessor, newParser, newPreparingStmt, newPreparingStmt, registerStreamFactories, validateSessionVariable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String LOG_DIR
public static final String[] LOG_DIR_DEFAULT
public static final String ETL_PROCESS_ID
public static final String ETL_PROCESS_ID_DEFAULT
public static final String ETL_ACTION_ID
public static final String ETL_ACTION_ID_DEFAULT
public static final String ERROR_MAX
public static final String ERROR_MAX_DEFAULT
public static final String ERROR_LOG_MAX
public static final String ERROR_LOG_MAX_DEFAULT
public static final String LAST_UPSERT_ROWS_INSERTED
public static final String LAST_UPSERT_ROWS_INSERTED_DEFAULT
public static final String LAST_ROWS_REJECTED
public static final String LAST_ROWS_REJECTED_DEFAULT
public static final String REDUCE_NON_CORRELATED_SUBQUERIES_LUCIDDB_DFLT
private boolean defaultLucidDb
private boolean enableIndexOnlyScans
| Constructor Detail |
|---|
protected LucidDbSessionPersonality(FarragoDbSession session,
FarragoSessionPersonality defaultPersonality,
boolean enableIndexOnlyScans)
| Method Detail |
|---|
public boolean isDefaultLucidDbPersonality()
public String getDefaultLocalDataServerName(FarragoSessionStmtValidator stmtValidator)
FarragoSessionPersonality
getDefaultLocalDataServerName in interface FarragoSessionPersonalitygetDefaultLocalDataServerName in class FarragoDefaultSessionPersonalitystmtValidator - validator for statement being prepared
public boolean isAlterTableAddColumnIncremental()
FarragoSessionPersonality
isAlterTableAddColumnIncremental in interface FarragoSessionPersonalityisAlterTableAddColumnIncremental in class FarragoDefaultSessionPersonalitypublic SqlOperatorTable getSqlOperatorTable(FarragoSessionPreparingStmt preparingStmt)
FarragoSessionPersonality
getSqlOperatorTable in interface FarragoSessionPersonalitygetSqlOperatorTable in class FarragoDefaultSessionPersonalitypreparingStmt - statement being prepared
public boolean supportsFeature(org.eigenbase.resgen.ResourceDefinition feature)
FarragoSessionPersonality
supportsFeature in interface FarragoSessionPersonalitysupportsFeature in class FarragoDefaultSessionPersonalityfeature - EigenbaseResource resource definition
representing the feature to be tested
public boolean shouldReplacePreserveOriginalSql()
FarragoSessionPersonality
shouldReplacePreserveOriginalSql in interface FarragoSessionPersonalityshouldReplacePreserveOriginalSql in class FarragoDefaultSessionPersonality
public FarragoSessionPlanner newPlanner(FarragoSessionPreparingStmt stmt,
boolean init)
FarragoSessionPersonality
newPlanner in interface FarragoSessionPersonalitynewPlanner in class FarragoDefaultSessionPersonalitystmt - stmt on whose behalf planner will operateinit - whether to initialize default rules in new planner
public void registerRelMetadataProviders(ChainedRelMetadataProvider chain)
FarragoSessionPersonalityRelMetadataProviders in the chain which will be used to answer
relational expression metadata queries during optimization. Personalities
which define their own relational expressions will generally need to
supply corresponding metadata providers.
registerRelMetadataProviders in interface FarragoSessionPersonalityregisterRelMetadataProviders in class FarragoDefaultSessionPersonalitychain - receives personality's custom providers, if anyprivate FarragoSessionPlanner newHepPlanner(FarragoSessionPreparingStmt stmt)
private HepProgram createHepProgram(boolean fennelEnabled,
CalcVirtualMachine calcVM,
Collection<RelOptRule> medPluginRules,
boolean alterTable)
private void applyPushDownFilterRules(HepProgramBuilder builder)
builder - HEP program builderprivate void applyPushDownProjectRules(HepProgramBuilder builder)
builder - HEP program builderpublic void loadDefaultSessionVariables(FarragoSessionVariables variables)
FarragoSessionPersonalityThis method should be called when initializing a new session or when loading a new session personality for an existing session. This method "leaves a mark", as it has the side effect of permanently updating the session variables. Even if the session personality is swapped out, the changes will remain.
loadDefaultSessionVariables in interface FarragoSessionPersonalityloadDefaultSessionVariables in class FarragoDefaultSessionPersonalityvariables - the session variables objectpublic FarragoSessionVariables createInheritedSessionVariables(FarragoSessionVariables variables)
FarragoSessionPersonality
createInheritedSessionVariables in interface FarragoSessionPersonalitycreateInheritedSessionVariables in class FarragoDefaultSessionPersonalityvariables - set of variables to be inherited
public FarragoSessionRuntimeContext newRuntimeContext(FarragoSessionRuntimeParams params)
FarragoSessionPersonality
newRuntimeContext in interface FarragoSessionPersonalitynewRuntimeContext in class FarragoDefaultSessionPersonalityparams - context initialization parameters
public FarragoSessionPreparingStmt newPreparingStmt(FarragoSessionStmtContext stmtContext,
FarragoSessionStmtValidator stmtValidator)
FarragoSessionPersonality
newPreparingStmt in interface FarragoSessionPersonalitynewPreparingStmt in class FarragoDefaultSessionPersonalitystmtContext - embracing stmt context, if any; otherwise, null.stmtValidator - generic stmt validator
FarragoSessionPreparingStmt.public RelDataTypeFactory newTypeFactory(FarragoRepos repos)
FarragoSessionPersonality
newTypeFactory in interface FarragoSessionPersonalitynewTypeFactory in class FarragoDefaultSessionPersonalityrepos - a repository containing Farrago metadata
public void getRowCounts(ResultSet resultSet,
List<Long> rowCounts,
TableModificationRelBase.Operation tableModOp)
throws SQLException
FarragoSessionPersonality
getRowCounts in interface FarragoSessionPersonalitygetRowCounts in class FarragoDefaultSessionPersonalityresultSet - result set returned by DML operationrowCounts - list of rowcounts returned by the DML operationtableModOp - table modification operation that caused the rowcounts
to be modified
SQLException
public long updateRowCounts(FarragoSession session,
List<String> tableName,
List<Long> rowCounts,
TableModificationRelBase.Operation tableModOp,
FarragoSessionRuntimeContext runningContext)
FarragoSessionPersonality
updateRowCounts in interface FarragoSessionPersonalityupdateRowCounts in class FarragoDefaultSessionPersonalitysession - session that needs to update rowcountstableName - fully qualified table name for which rowcounts will be
updatedrowCounts - list of row counts returned by the DML statementtableModOp - table modification operation that caused the rowcounts
to be modifiedrunningContext - the currently running session context.
public void resetRowCounts(FemAbstractColumnSet table)
FarragoSessionPersonality
resetRowCounts in interface FarragoSessionPersonalityresetRowCounts in class FarragoDefaultSessionPersonalitytable - column set corresponding to table
public void updateIndexRoot(FemLocalIndex index,
FarragoDataWrapperCache wrapperCache,
FarragoSessionIndexMap baseIndexMap,
Long newRoot)
FarragoSessionPersonality
updateIndexRoot in interface FarragoSessionPersonalityupdateIndexRoot in class FarragoDefaultSessionPersonalityindex - index whose root is being updatedwrapperCache - cache for looking up data wrappersbaseIndexMap - map for managing index storagenewRoot - index's new root page
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||