mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Merge pull request #43090 from ClickHouse/vdimir/window_frame_type_groups_assert
Throw not implemented for window frame type 'groups' in analyzer
This commit is contained in:
commit
80a13538ca
@ -11,6 +11,11 @@
|
||||
namespace DB
|
||||
{
|
||||
|
||||
namespace ErrorCodes
|
||||
{
|
||||
extern const int NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
@ -65,6 +70,11 @@ std::vector<WindowDescription> extractWindowDescriptions(const QueryTreeNodes &
|
||||
auto & window_function_node_typed = window_function_node->as<FunctionNode &>();
|
||||
|
||||
auto function_window_description = extractWindowDescriptionFromWindowNode(window_function_node_typed.getWindowNode(), planner_context);
|
||||
|
||||
auto frame_type = function_window_description.frame.type;
|
||||
if (frame_type != WindowFrame::FrameType::ROWS && frame_type != WindowFrame::FrameType::RANGE)
|
||||
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Window frame '{}' is not implemented", frame_type);
|
||||
|
||||
auto window_name = function_window_description.window_name;
|
||||
|
||||
auto [it, _] = window_name_to_description.emplace(window_name, std::move(function_window_description));
|
||||
|
@ -0,0 +1,7 @@
|
||||
SET allow_experimental_analyzer = 0;
|
||||
|
||||
SELECT toUInt64(dense_rank(1) OVER (ORDER BY 100 ASC GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)) FROM numbers(10); -- { serverError 48 }
|
||||
|
||||
SET allow_experimental_analyzer = 1;
|
||||
|
||||
SELECT toUInt64(dense_rank(1) OVER (ORDER BY 100 ASC GROUPS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)) FROM numbers(10); -- { serverError 48 }
|
Loading…
Reference in New Issue
Block a user