@Override public MaterializedViewQuery withId(String id) { return new MaterializedViewQuery(query.withId(id), optimizer); }
/** * Initializes this object to execute a specific query. Does not actually execute the query. * * @param baseQuery the query */ @SuppressWarnings("unchecked") public void initialize(final Query baseQuery) { transition(State.NEW, State.INITIALIZED); String queryId = baseQuery.getId(); if (Strings.isNullOrEmpty(queryId)) { queryId = UUID.randomUUID().toString(); } this.baseQuery = baseQuery.withId(queryId); this.toolChest = warehouse.getToolChest(baseQuery); }
@SuppressWarnings("unchecked") private <T> Sequence<T> runQuery(Query<T> query) { Hook.QUERY_PLAN.run(query); final String queryId = UUID.randomUUID().toString(); plannerContext.addNativeQueryId(queryId); query = query.withId(queryId) .withSqlQueryId(plannerContext.getSqlQueryId()); final AuthenticationResult authenticationResult = plannerContext.getAuthenticationResult(); return queryLifecycleFactory.factorize().runSimple(query, authenticationResult, null); }
targetServer = hostFinder.pickServer(inputQuery); if (inputQuery.getId() == null) { inputQuery = inputQuery.withId(UUID.randomUUID().toString());
/** * Initializes this object to execute a specific query. Does not actually execute the query. * * @param baseQuery the query */ @SuppressWarnings("unchecked") public void initialize(final Query baseQuery) { transition(State.NEW, State.INITIALIZED); String queryId = baseQuery.getId(); if (Strings.isNullOrEmpty(queryId)) { queryId = UUID.randomUUID().toString(); } this.baseQuery = baseQuery.withId(queryId); this.toolChest = warehouse.getToolChest(baseQuery); }
targetServer = hostFinder.pickServer(inputQuery); if (inputQuery.getId() == null) { inputQuery = inputQuery.withId(UUID.randomUUID().toString());