未验证 提交 5998383a 编写于 作者: A Amos Bird

Fix with aggregates

上级 0b74d146
......@@ -55,6 +55,7 @@
#include <IO/WriteBufferFromString.h>
#include <Processors/Executors/PullingPipelineExecutor.h>
#include <Parsers/formatAST.h>
namespace DB
{
......
......@@ -31,6 +31,12 @@ public:
{
if (child->as<ASTSubquery>() || child->as<ASTSelectQuery>())
return false;
if (auto * select = node->as<ASTSelectQuery>())
{
// We don't analysis WITH statement because it might contain useless aggregates
if (child == select->with())
return false;
}
if (auto * func = node->as<ASTFunction>())
{
if (isAggregateFunction(*func))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册