window function - support general expression