DRILL-1845: window function throws an exception