public static int getNumTasksForQuery(int numOperators, int maxExecutionThreads) {
    return getNumTasks(numOperators, 1, maxExecutionThreads);
  }
@Test
  public void testGetNumTasksForQuery() {
    Assert.assertEquals(QueryMultiThreadingUtils.getNumTasksForQuery(1, 2), 1);
    Assert.assertEquals(QueryMultiThreadingUtils.getNumTasksForQuery(3, 2), 2);
    Assert.assertEquals(QueryMultiThreadingUtils.getNumTasksForQuery(0, -1), 1);
    int numOps = QueryMultiThreadingUtils.MAX_NUM_THREADS_PER_QUERY;
    // TaskUtils.MAX_NUM_THREADS_PER_QUERY at max
    Assert.assertEquals(QueryMultiThreadingUtils.getNumTasksForQuery(numOps + 10, -1),
        QueryMultiThreadingUtils.MAX_NUM_THREADS_PER_QUERY);
    // But 1 at min
    Assert.assertEquals(QueryMultiThreadingUtils.getNumTasksForQuery(numOps - 1, -1), Math.max(1, numOps - 1));
  }