From aa4751a63213da6221e3f5e7257407d47ceb3098 Mon Sep 17 00:00:00 2001 From: Ilya Golshtein Date: Mon, 20 Sep 2021 14:36:37 +0300 Subject: [PATCH] checkStackSize moved to the top of DNF::distributed in ORs in JOIN --- src/Interpreters/TreeRewriter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Interpreters/TreeRewriter.cpp b/src/Interpreters/TreeRewriter.cpp index 9a86fa1dcd2..c426d39ccfc 100644 --- a/src/Interpreters/TreeRewriter.cpp +++ b/src/Interpreters/TreeRewriter.cpp @@ -555,6 +555,8 @@ class DNF ASTPtr distribute(ASTPtr node) { + checkStackSize(); + const auto * function = node->as(); if (function && function->children.size() == 1) @@ -628,7 +630,6 @@ class DNF makeASTFunction("or", lst) : lst[0]; - checkStackSize(); node_added = true; return ret;