public ScanResult getScanResult() { return context.getScanResult(); }
ExpansionHelper(QueryContext context) { this.context = Preconditions.checkNotNull(context, "query context required"); converter = new SqlConverter( context.getPlannerSettings(), context.getOperatorTable(), context, MaterializationDescriptorProvider.EMPTY, context.getFunctionRegistry(), context.getSession(), AbstractAttemptObserver.NOOP, context.getCatalog(), context.getSubstitutionProviderFactory(), context.getConfig(), context.getScanResult()); }
private SqlConverter getNewConverter(QueryContext context, SqlQuery query, AttemptObserver observerForSubstitution) { Catalog catalog = context.getCatalog(); final List<String> sqlContext = query.getContext(); if(sqlContext != null){ NamespaceKey path = new NamespaceKey(sqlContext); try { catalog = catalog.resolveCatalog(path); } catch (Exception e) { throw UserException.validationError(e) .message("Unable to resolve schema path [%s]. Failure resolving [%s] portion of path.", sqlContext, path) .build(logger); } } return new SqlConverter( context.getPlannerSettings(), context.getOperatorTable(), context, context.getMaterializationProvider(), context.getFunctionRegistry(), context.getSession(), observerForSubstitution, catalog, context.getSubstitutionProviderFactory(), context.getConfig(), context.getScanResult()); }
Writer writer = getWriter(context.getOptions()); OperatorCreatorRegistry registry = new OperatorCreatorRegistry(context.getScanResult()); OperatorContextImpl ocx = createContext(writer); try(
queryContext.getSubstitutionProviderFactory(), queryContext.getConfig(), queryContext.getScanResult()); final SqlNode node = converter.parse(sql); final SqlHandlerConfig config = new SqlHandlerConfig(queryContext, converter, observer, null);
protected ElasticsearchGroupScan generate(String sql) throws Exception { AttemptObserver observer = new PassthroughQueryObserver(ExecTest.mockUserClientConnection(null)); SqlConverter converter = new SqlConverter(context.getPlannerSettings(), context.getOperatorTable(), context, context.getMaterializationProvider(), context.getFunctionRegistry(), context.getSession(), observer, context.getCatalog(), context.getSubstitutionProviderFactory(), context.getConfig(), context.getScanResult()); SqlNode node = converter.parse(sql); SqlHandlerConfig config = new SqlHandlerConfig(context, converter, observer, null); NormalHandler handler = new NormalHandler(); PhysicalPlan plan = handler.getPlan(config, sql, node); List<PhysicalOperator> operators = plan.getSortedOperators(); ElasticsearchGroupScan scan = find(operators); assertNotNull("Physical plan does not contain an elasticsearch scan for query: " + sql, scan); return scan; }
queryContext.getSubstitutionProviderFactory(), queryContext.getConfig(), queryContext.getScanResult()); final SqlNode node = converter.parse(sql); final SqlHandlerConfig config = new SqlHandlerConfig(queryContext, converter, observer, null);
context.getSubstitutionProviderFactory(), context.getConfig(), context.getScanResult());