mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
a setting
This commit is contained in:
parent
5e19eaf2f0
commit
4bfcb2fc16
@ -405,6 +405,7 @@ class IColumn;
|
||||
M(Bool, optimize_skip_merged_partitions, false, "Skip partitions with one part with level > 0 in optimize final", 0) \
|
||||
M(Bool, optimize_on_insert, true, "Do the same transformation for inserted block of data as if merge was done on this block.", 0) \
|
||||
M(Bool, allow_experimental_map_type, false, "Allow data type Map", 0) \
|
||||
M(Bool, allow_experimental_window_functions, false, "Allow experimental window functions", 0) \
|
||||
\
|
||||
M(Bool, use_antlr_parser, false, "Parse incoming queries using ANTLR-generated parser", 0) \
|
||||
\
|
||||
|
@ -472,6 +472,15 @@ bool ExpressionAnalyzer::makeAggregateDescriptions(ActionsDAGPtr & actions)
|
||||
|
||||
bool ExpressionAnalyzer::makeWindowDescriptions(ActionsDAGPtr & actions)
|
||||
{
|
||||
// Convenient to check here because at least we have the Context.
|
||||
if (windowFunctions().size() > 0 &&
|
||||
!context.getSettingsRef().allow_experimental_window_functions)
|
||||
{
|
||||
throw Exception(ErrorCodes::NOT_IMPLEMENTED,
|
||||
"Window functions are not implemented (while processing '{}')",
|
||||
windowFunctions()[0]->formatForErrorMessage());
|
||||
}
|
||||
|
||||
for (const ASTFunction * function_node : windowFunctions())
|
||||
{
|
||||
assert(function_node->is_window_function);
|
||||
|
@ -1,5 +1,7 @@
|
||||
-- { echo }
|
||||
|
||||
set allow_experimental_window_functions = 1;
|
||||
|
||||
-- just something basic
|
||||
select number, count() over (partition by intDiv(number, 3) order by number) from numbers(10);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user