Made getQueryPlan interface more consistent.