update code style

This commit is contained in:
Vxider 2021-05-29 10:29:38 +00:00
parent 635870f50c
commit b56d471540
6 changed files with 479 additions and 478 deletions

View File

@ -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

View File

@ -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);
}
} }
}; };

View File

View File

View File

View File