com.dremio.exec.ops.QueryContext.getLpPersistence()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(74)

本文整理了Java中com.dremio.exec.ops.QueryContext.getLpPersistence方法的一些代码示例,展示了QueryContext.getLpPersistence的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryContext.getLpPersistence方法的具体详情如下:
包路径:com.dremio.exec.ops.QueryContext
类名称:QueryContext
方法名:getLpPersistence

QueryContext.getLpPersistence介绍

暂无

代码示例

代码示例来源:origin: dremio/dremio-oss

public static void log(final SqlHandlerConfig config, final String name, final PhysicalPlan plan, final Logger logger) throws JsonProcessingException {
 if (logger.isDebugEnabled()) {
  String planText = plan.unparse(config.getContext().getLpPersistence().getMapper().writer());
  logger.debug(name + " : \n" + planText);
 }
}

代码示例来源:origin: dremio/dremio-oss

protected QueryContext mockQueryContext(SabotContext dbContext) throws Exception {
 final UserSession userSession = UserSession.Builder.newBuilder().withOptionManager(dbContext.getOptionManager()).build();
 final SessionOptionManager sessionOptions = (SessionOptionManager) userSession.getOptions();
 final QueryOptionManager queryOptions = new QueryOptionManager(sessionOptions);
 final ExecutionControls executionControls = new ExecutionControls(queryOptions, NodeEndpoint.getDefaultInstance());
 final OperatorTable table = new OperatorTable(FUNCTIONS());
 final LogicalPlanPersistence lp = dbContext.getLpPersistence();
 final CatalogService registry = dbContext.getCatalogService();
 final QueryContext context = Mockito.mock(QueryContext.class);
 when(context.getSession()).thenReturn(userSession);
 when(context.getLpPersistence()).thenReturn(lp);
 when(context.getCatalogService()).thenReturn(registry);
 when(context.getFunctionRegistry()).thenReturn(FUNCTIONS());
 when(context.getSession()).thenReturn(UserSession.Builder.newBuilder().setSupportComplexTypes(true).build());
 when(context.getCurrentEndpoint()).thenReturn(NodeEndpoint.getDefaultInstance());
 when(context.getActiveEndpoints()).thenReturn(ImmutableList.of(NodeEndpoint.getDefaultInstance()));
 when(context.getPlannerSettings()).thenReturn(new PlannerSettings(dbContext.getConfig(), queryOptions, dbContext.getClusterResourceInformation()));
 when(context.getOptions()).thenReturn(queryOptions);
 when(context.getConfig()).thenReturn(DEFAULT_SABOT_CONFIG);
 when(context.getOperatorTable()).thenReturn(table);
 when(context.getAllocator()).thenReturn(allocator);
 when(context.getExecutionControls()).thenReturn(executionControls);
 when(context.getMaterializationProvider()).thenReturn(Mockito.mock(MaterializationDescriptorProvider.class));
 return context;
}

代码示例来源:origin: dremio/dremio-oss

final String postPhysicaltextPlan = plan.unparse(config.getContext().getLpPersistence().getMapper().writer());

相关文章