Refactor window function syntax checks to match upstream.
Mostly, move the responsibilities of the check_call() function to the callers, transformAggregateCall() and transformWindowFuncCall(). This fixes one long-standing, albeit harmless, bug. Previously, you got an "Unexpected internal error", if you tried to use a window function in the WHERE clause of a DELETE statement, instead of a user-friendly syntax error. Add a test case for that. Move a few similar tests from 'olap_window_seq' to 'qp_olap_windowerr'. Seems like a more appropriate place for them. Also, 'olap_window_seq' has an alternative expected output file for ORCA, so it's nice to keep tests that produce the same output with or without ORCA out of there. Also add a test query for creating an index on an expression containing a window function. There was a test for that already, but it was missing parens around the expression, and therefore produced an error already in the grammar.
Showing
想要评论请 注册 或 登录