Source:
<code>public Map<ServerInstance, DataTable> queryPinotServerForDataTable(String pql, String serverHost, String segment) { long requestId = requestIdGenerator.incrementAndGet(); BrokerRequest brokerRequest; try { brokerRequest = REQUEST_COMPILER.compileToBrokerRequest(pql); } catch (Exception e) { throw new PrestoException( PINOT_FAILURE_QUERYING_DATA, String.format("Parsing error on requestId %d, PQL = %s", requestId, pql), e); } <START> Map<String, List<String>> routingTable = new HashMap<>(); <END> List<String> segmentList = new ArrayList<>(); segmentList.add(segment); routingTable.put(serverHost, segmentList); ScatterGatherRequestImpl scatterRequest = new ScatterGatherRequestImpl(brokerRequest, routingTable, 0, connectionTimeout.toMillis(), prestoHostId); ScatterGatherStats scatterGatherStats = new ScatterGatherStats(); CompositeFuture<byte[]> compositeFuture = routeScatterGather(scatterRequest, scatterGatherStats); if (compositeFuture == null) { return null; } Map<ServerInstance, DataTable> dataTableMap = new HashMap<>(); List<ProcessingException> processingExceptions = new ArrayList<>(); Map<ServerInstance, byte[]> serverResponseMap = null; serverResponseMap = gatherServerResponses(compositeFuture, scatterGatherStats, true, brokerRequest.getQuerySource().getTableName(), processingExceptions); deserializeServerResponses(serverResponseMap, true, dataTableMap, brokerRequest.getQuerySource().getTableName(), processingExceptions); return dataTableMap; }</code><technical_language>ImmutableMap.builder</technical_language>

Target:
public Map<ServerInstance, DataTable> queryPinotServerForDataTable(String pql, String serverHost, String segment) { long requestId = requestIdGenerator.incrementAndGet(); BrokerRequest brokerRequest; try { brokerRequest = REQUEST_COMPILER.compileToBrokerRequest(pql); } catch (Exception e) { throw new PrestoException( PINOT_FAILURE_QUERYING_DATA, String.format("Parsing error on requestId %d, PQL = %s", requestId, pql), e); } ImmutableMap.Builder<String, List<String>> routingTableBuilder = ImmutableMap.builder(); List<String> segmentList = Arrays.asList(segment); routingTableBuilder.put(serverHost, segmentList); ScatterGatherRequest scatterRequest = new SimpleScatterGatherRequest(brokerRequest, routingTableBuilder.build(), 0, connectionTimeout.toMillis(), prestoHostId); ScatterGatherStats scatterGatherStats = new ScatterGatherStats(); CompositeFuture<byte[]> compositeFuture = routeScatterGather(scatterRequest, scatterGatherStats); if (compositeFuture == null) { throw new PrestoException( PINOT_FAILURE_QUERYING_DATA, String.format("Failed to get data from table. PQL = %s.", pql)); } ImmutableMap.Builder<ServerInstance, DataTable> dataTableMapBuilder = ImmutableMap.builder(); ImmutableList.Builder<ProcessingException> processingExceptionsBuilder = ImmutableList.builder(); Map<ServerInstance, byte[]> serverResponseMap = gatherServerResponses(compositeFuture, scatterGatherStats, true, brokerRequest.getQuerySource().getTableName(), processingExceptionsBuilder); deserializeServerResponses(serverResponseMap, dataTableMapBuilder, brokerRequest.getQuerySource().getTableName(), processingExceptionsBuilder); return dataTableMapBuilder.build(); }