replace Map context with QueryContext