checkNotNull(partitions, "partitions is null");
if (partitions.isEmpty()) {
return new FixedSplitSource(connectorId, ImmutableList.<ConnectorSplit>of());
}
ConnectorPartition partition = Iterables.getOnlyElement(partitions);
checkArgument(partition instanceof TpchPartition, "Partition must be a tpch partition");
TpchTableHandle tableHandle = ((TpchPartition) partition).getTable();
Set<Node> nodes = nodeManager.getActiveDatasourceNodes(connectorId);
checkState(!nodes.isEmpty(), "No TPCH nodes available: Add '%s' to the datasources property of each worker node", connectorId);