提交 211db82e 编写于 作者: H Heikki Linnakangas

Remove unnecessary handlers of raw parse nodes in contain_windowfuncs()

We no longer call contain_windowfunc() on raw parse trees, so we can
revert this to the way it is in the upstream.
上级 bea61a71
......@@ -213,51 +213,7 @@ contain_windowfuncs_walker(Node *node, void *context)
if (node == NULL)
return false;
if (IsA(node, WindowRef))
{
return true; /* abort the tree traversal and return true */
}
else if (IsA(node, SortBy))
{
SortBy *s = (SortBy *) node;
return contain_windowfuncs_walker(s->node, context);
}
else if (IsA(node, WindowFrame))
{
WindowFrame *f = (WindowFrame *) node;
if (contain_windowfuncs_walker((Node *)f->trail, context))
return true;
if (contain_windowfuncs_walker((Node *)f->lead, context))
return true;
}
else if (IsA(node, WindowFrameEdge))
{
WindowFrameEdge *e = (WindowFrameEdge *) node;
return contain_windowfuncs_walker(e->val, context);
}
else if(IsA(node, A_Expr))
{
/* could be seen inside an untransformed window clause */
return false;
}
else if(IsA(node, ColumnRef))
{
/* could be seen inside an untransformed window clause */
return false;
}
else if (IsA(node, A_Const))
{
/* could be seen inside an untransformed window clause */
return false;
}
else if (IsA(node, TypeCast))
{
/* could be seen inside an untransformed window clause */
return false;
}
return true; /* abort the tree traversal and return true */
/* Mustn't recurse into subselects */
return expression_tree_walker(node, contain_windowfuncs_walker,
(void *) context);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册