mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 02:12:21 +00:00
update code style
This commit is contained in:
parent
635870f50c
commit
b56d471540
@ -137,7 +137,7 @@ struct ToStartOfTransform;
|
|||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
static std::tuple<IntervalKind::Kind, Int64>
|
std::tuple<IntervalKind::Kind, Int64>
|
||||||
dispatchForIntervalColumns(const ColumnWithTypeAndName & interval_column, const String & function_name)
|
dispatchForIntervalColumns(const ColumnWithTypeAndName & interval_column, const String & function_name)
|
||||||
{
|
{
|
||||||
const auto * interval_type = checkAndGetDataType<DataTypeInterval>(interval_column.type.get());
|
const auto * interval_type = checkAndGetDataType<DataTypeInterval>(interval_column.type.get());
|
||||||
@ -157,7 +157,7 @@ namespace
|
|||||||
return {interval_type->getKind(), num_units};
|
return {interval_type->getKind(), num_units};
|
||||||
}
|
}
|
||||||
|
|
||||||
static ColumnPtr executeWindowBound(const ColumnPtr & column, int index, const String & function_name)
|
ColumnPtr executeWindowBound(const ColumnPtr & column, int index, const String & function_name)
|
||||||
{
|
{
|
||||||
if (const ColumnTuple * col_tuple = checkAndGetColumn<ColumnTuple>(column.get()); col_tuple)
|
if (const ColumnTuple * col_tuple = checkAndGetColumn<ColumnTuple>(column.get()); col_tuple)
|
||||||
{
|
{
|
||||||
@ -224,7 +224,7 @@ namespace
|
|||||||
checkIntervalArgument(argument, function_name, interval_kind, result_type_is_date);
|
checkIntervalArgument(argument, function_name, interval_kind, result_type_is_date);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
template <WindowFunctionName type>
|
template <WindowFunctionName type>
|
||||||
struct WindowImpl
|
struct WindowImpl
|
||||||
@ -362,7 +362,6 @@ namespace
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct WindowImpl<TUMBLE_END>
|
struct WindowImpl<TUMBLE_END>
|
||||||
{
|
{
|
||||||
@ -741,7 +740,6 @@ namespace
|
|||||||
return executeWindowBound(result_column_, 1, function_name);
|
return executeWindowBound(result_column_, 1, function_name);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
template <WindowFunctionName type>
|
template <WindowFunctionName type>
|
||||||
class FunctionWindow : public IFunction
|
class FunctionWindow : public IFunction
|
||||||
|
@ -205,7 +205,10 @@ namespace
|
|||||||
static void visit(const ASTIdentifier & node, ASTPtr & node_ptr, Data & data)
|
static void visit(const ASTIdentifier & node, ASTPtr & node_ptr, Data & data)
|
||||||
{
|
{
|
||||||
if (node.getColumnName() == data.window_id_alias)
|
if (node.getColumnName() == data.window_id_alias)
|
||||||
dynamic_cast<ASTIdentifier *>(node_ptr.get())->setShortName(data.window_id_name);
|
{
|
||||||
|
if (auto identifier = std::dynamic_pointer_cast<ASTIdentifier>(node_ptr))
|
||||||
|
identifier->setShortName(data.window_id_name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
0
tests/queries/0_stateless/01052_window_view_proc_tumble_to_now.sql
Executable file → Normal file
0
tests/queries/0_stateless/01052_window_view_proc_tumble_to_now.sql
Executable file → Normal file
0
tests/queries/0_stateless/01053_window_view_proc_hop_to_now.sql
Executable file → Normal file
0
tests/queries/0_stateless/01053_window_view_proc_hop_to_now.sql
Executable file → Normal file
0
tests/queries/0_stateless/01054_window_view_proc_tumble_to.sql
Executable file → Normal file
0
tests/queries/0_stateless/01054_window_view_proc_tumble_to.sql
Executable file → Normal file
0
tests/queries/0_stateless/01055_window_view_proc_hop_to.sql
Executable file → Normal file
0
tests/queries/0_stateless/01055_window_view_proc_hop_to.sql
Executable file → Normal file
Loading…
Reference in New Issue
Block a user