.withCatalog(query.getSetCatalog().orElse(session.getCatalog())) .withSchema(query.getSetSchema().orElse(session.getSchema())) .build(); schemaChanged.run(); builder = builder.withTransactionId(query.getStartedTransactionId()); builder = builder.withPath(query.getSetPath().get()); sessionProperties.putAll(query.getSetSessionProperties()); sessionProperties.keySet().removeAll(query.getResetSessionProperties()); builder = builder.withProperties(sessionProperties); preparedStatements.putAll(query.getAddedPreparedStatements()); preparedStatements.keySet().removeAll(query.getDeallocatedPreparedStatements()); builder = builder.withPreparedStatements(preparedStatements); session = builder.build(); queryRunner.setSession(session);
.withCatalog(query.getSetCatalog().orElse(session.getCatalog())) .withSchema(query.getSetSchema().orElse(session.getSchema())) .build(); schemaChanged.run(); builder = builder.withTransactionId(query.getStartedTransactionId()); builder = builder.withPath(query.getSetPath().get()); sessionProperties.putAll(query.getSetSessionProperties()); sessionProperties.keySet().removeAll(query.getResetSessionProperties()); builder = builder.withProperties(sessionProperties); preparedStatements.putAll(query.getAddedPreparedStatements()); preparedStatements.keySet().removeAll(query.getDeallocatedPreparedStatements()); builder = builder.withPreparedStatements(preparedStatements); session = builder.build(); queryRunner.setSession(session);
properties.putAll(suite.getSessionProperties()); ClientSession session = ClientSession.builder(clientSession) .withProperties(properties) .build(); for (BenchmarkQuery benchmarkQuery : queries) { session = ClientSession.builder(session) .withCatalog(session.getCatalog()) .withSchema(benchmarkSchema.getName()) .build(); BenchmarkQueryResult result = queryRunner.execute(suite, session, benchmarkQuery);
public static Builder builder(ClientSession clientSession) { return new Builder(clientSession); }
public static ClientSession stripTransactionId(ClientSession session) { return ClientSession.builder(session) .withoutTransactionId() .build(); }