ClickHouse/src/Planner/PlannerWindowFunctions.h
2022-10-24 10:22:38 +02:00

21 lines
606 B
C++

#pragma once
#include <Core/SortDescription.h>
#include <Planner/PlannerContext.h>
#include <Interpreters/WindowDescription.h>
namespace DB
{
/// Extract window descriptions from window function nodes
std::vector<WindowDescription> extractWindowDescriptions(const QueryTreeNodes & window_function_nodes, const PlannerContext & planner_context);
/** Try to sort window descriptions in such an order that the window with the longest
* sort description goes first, and all window that use its prefixes follow.
*/
void sortWindowDescriptions(std::vector<WindowDescription> & window_descriptions);
}