Source:
<code>public ConnectorSplitSource getSplits( ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorTableLayoutHandle layout, SplitSchedulingContext splitSchedulingContext) { PinotTableLayoutHandle layoutHandle = checkType(layout, PinotTableLayoutHandle.class, "layout"); PinotTableHandle tableHandle = layoutHandle.getTable(); PinotTable table = null; PinotColumn timeColumn = null; Map<String, Map<String, List<String>>> routingTable = null; <START> Map<String, String> timeBoundary = null; <END> try { table = pinotPrestoConnection.getTable(tableHandle.getTableName()); timeColumn = pinotPrestoConnection.getPinotTimeColumnForTable(tableHandle.getTableName()); routingTable = pinotPrestoConnection.getRoutingTable(tableHandle.getTableName()); timeBoundary = pinotPrestoConnection.getTimeBoundary(tableHandle.getTableName()); checkState(table != null, "Table %s no longer exists", tableHandle.getTableName()); } catch (Exception e) { throw new PrestoException( PINOT_FAILURE_GETTING_TABLE, "Failed to fetch table status for Pinot table: " + tableHandle.getTableName(), e); } List<ConnectorSplit> splits = new ArrayList<>(); if (!routingTable.isEmpty()) { setSplits(splits, timeColumn, routingTable, timeBoundary, getOfflineTableName(tableHandle.getTableName()), tableHandle.getConstraintSummary()); setSplits(splits, timeColumn, routingTable, timeBoundary, getRealtimeTableName(tableHandle.getTableName()), tableHandle.getConstraintSummary()); } Collections.shuffle(splits); log.debug("PinotSplits is %s", Arrays.toString(splits.toArray())); return new FixedSplitSource(splits); }</code><technical_language>null assignments needed. declare variables</technical_language>

Target:
public ConnectorSplitSource getSplits( ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorTableLayoutHandle layout, SplitSchedulingContext splitSchedulingContext) { PinotTableLayoutHandle layoutHandle = checkType(layout, PinotTableLayoutHandle.class, "layout"); PinotTableHandle tableHandle = layoutHandle.getTable(); PinotTable table; PinotColumn timeColumn; Map<String, Map<String, List<String>>> routingTable; Map<String, String> timeBoundary; try { table = pinotPrestoConnection.getTable(tableHandle.getTableName()); timeColumn = pinotPrestoConnection.getPinotTimeColumnForTable(tableHandle.getTableName()); routingTable = pinotPrestoConnection.getRoutingTable(tableHandle.getTableName()); timeBoundary = pinotPrestoConnection.getTimeBoundary(tableHandle.getTableName()); checkState(table != null, "Table %s no longer exists", tableHandle.getTableName()); } catch (Exception e) { throw new PrestoException( PINOT_FAILURE_GETTING_TABLE, "Failed to fetch table status for Pinot table: " + tableHandle.getTableName(), e); } List<ConnectorSplit> splits = new ArrayList<>(); if (!routingTable.isEmpty()) { setSplits(splits, timeColumn, routingTable, timeBoundary, TableNameBuilder.OFFLINE.tableNameWithType(tableHandle.getTableName()), tableHandle.getConstraintSummary()); setSplits(splits, timeColumn, routingTable, timeBoundary, TableNameBuilder.REALTIME.tableNameWithType(tableHandle.getTableName()), tableHandle.getConstraintSummary()); } Collections.shuffle(splits); return new FixedSplitSource(splits); }