Package io.trino.testing
Class LocalQueryRunner
java.lang.Object
io.trino.testing.LocalQueryRunner
- All Implemented Interfaces:
QueryRunner,Closeable,AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfaceNested classes/interfaces inherited from interface io.trino.testing.QueryRunner
QueryRunner.MaterializedResultWithPlan -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFunctions(List<? extends SqlFunction> functions) static LocalQueryRunner.Buildervoidclose()static LocalQueryRunnervoidcreateCatalog(String catalogName, ConnectorFactory connectorFactory, Map<String, String> properties) voidcreateDrivers(Session session, String sql, OutputFactory outputFactory, TaskContext taskContext) createDrivers(String sql, OutputFactory outputFactory, TaskContext taskContext) createPlan(Session session, String sql, WarningCollector warningCollector) createPlan(Session session, String sql, LogicalPlanner.Stage stage, boolean forceSingleNode, WarningCollector warningCollector) createPlan(Session session, String sql, LogicalPlanner.Stage stage, WarningCollector warningCollector) createPlan(Session session, String sql, List<PlanOptimizer> optimizers, WarningCollector warningCollector) createPlan(Session session, String sql, List<PlanOptimizer> optimizers, LogicalPlanner.Stage stage, WarningCollector warningCollector) createSubPlans(Session session, Plan plan, boolean forceSingleNode) executeWithPlan(Session session, String sql, WarningCollector warningCollector) intgetPlanOptimizers(boolean forceSingleNode) voidinjectTaskFailure(String traceToken, int stageId, int partitionId, int attemptId, FailureInjector.InjectedFailureType injectionType, Optional<ErrorType> errorType) voidinstallPlugin(Plugin plugin) <T> TinTransaction(Session session, Function<Session, T> transactionSessionConsumer) <T> TinTransaction(Function<Session, T> transactionSessionConsumer) listTables(Session session, String catalog, String schema) voidbooleantableExists(Session session, String table)
-
Method Details
-
create
-
builder
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceQueryRunner
-
loadEventListeners
public void loadEventListeners() -
getNodeCount
public int getNodeCount()- Specified by:
getNodeCountin interfaceQueryRunner
-
getCatalogManager
-
getTransactionManager
- Specified by:
getTransactionManagerin interfaceQueryRunner
-
getSqlParser
-
getPlannerContext
-
getMetadata
- Specified by:
getMetadatain interfaceQueryRunner
-
getTypeManager
- Specified by:
getTypeManagerin interfaceQueryRunner
-
getQueryExplainer
- Specified by:
getQueryExplainerin interfaceQueryRunner
-
getSessionPropertyManager
- Specified by:
getSessionPropertyManagerin interfaceQueryRunner
-
getTypeOperators
-
getBlockTypeOperators
-
getNodePartitioningManager
- Specified by:
getNodePartitioningManagerin interfaceQueryRunner
-
getPageSourceManager
- Specified by:
getPageSourceManagerin interfaceQueryRunner
-
getSplitManager
- Specified by:
getSplitManagerin interfaceQueryRunner
-
getStatsCalculator
- Specified by:
getStatsCalculatorin interfaceQueryRunner
-
getCostCalculator
-
getEstimatedExchangesCostCalculator
-
getGroupProvider
- Specified by:
getGroupProviderin interfaceQueryRunner
-
getAccessControl
- Specified by:
getAccessControlin interfaceQueryRunner
-
getExecutor
-
getScheduler
-
getDefaultSession
- Specified by:
getDefaultSessionin interfaceQueryRunner
-
getExpressionCompiler
-
createCatalog
public void createCatalog(String catalogName, ConnectorFactory connectorFactory, Map<String, String> properties) -
installPlugin
- Specified by:
installPluginin interfaceQueryRunner
-
addFunctions
- Specified by:
addFunctionsin interfaceQueryRunner
-
createCatalog
- Specified by:
createCatalogin interfaceQueryRunner
-
printPlan
-
listTables
- Specified by:
listTablesin interfaceQueryRunner
-
tableExists
- Specified by:
tableExistsin interfaceQueryRunner
-
execute
- Specified by:
executein interfaceQueryRunner
-
execute
- Specified by:
executein interfaceQueryRunner
-
executeWithPlan
public QueryRunner.MaterializedResultWithPlan executeWithPlan(Session session, String sql, WarningCollector warningCollector) - Specified by:
executeWithPlanin interfaceQueryRunner
-
inTransaction
-
inTransaction
-
getExclusiveLock
- Specified by:
getExclusiveLockin interfaceQueryRunner
-
injectTaskFailure
public void injectTaskFailure(String traceToken, int stageId, int partitionId, int attemptId, FailureInjector.InjectedFailureType injectionType, Optional<ErrorType> errorType) - Specified by:
injectTaskFailurein interfaceQueryRunner
-
createDrivers
-
createDrivers
public List<Driver> createDrivers(Session session, String sql, OutputFactory outputFactory, TaskContext taskContext) -
createSubPlans
-
createPlan
- Specified by:
createPlanin interfaceQueryRunner
-
createPlan
public Plan createPlan(Session session, String sql, LogicalPlanner.Stage stage, WarningCollector warningCollector) -
createPlan
public Plan createPlan(Session session, String sql, LogicalPlanner.Stage stage, boolean forceSingleNode, WarningCollector warningCollector) -
getPlanOptimizers
-
createPlan
public Plan createPlan(Session session, String sql, List<PlanOptimizer> optimizers, WarningCollector warningCollector) -
createPlan
public Plan createPlan(Session session, String sql, List<PlanOptimizer> optimizers, LogicalPlanner.Stage stage, WarningCollector warningCollector)
-