```bash
2020.10.14 20:18:20.119165 [ 2128322 ] {49c1f251-76d5-4dbb-bc9a-7b7d50a55115} <Debug> executeQuery: (from [::1]:40200) SELECT abs(e() - arraySum(arrayMap(x -> divide(1., arraySlice(groupArray(x), 7), tgamma(x + 1048575)), range(257)))) < '102.5'
2020.10.14 20:18:20.123486 [ 2200638 ] {} <Fatal> BaseDaemon: ########################################
2020.10.14 20:18:20.123961 [ 2200638 ] {} <Fatal> BaseDaemon: (version 20.11.1.1, build id: BE90A35D748CA99A) (from thread 2128322) (query_id: 49c1f251-76d5-4dbb-bc9a-7b7d50a55115) Received signal Segmentation fault (11)
2020.10.14 20:18:20.124205 [ 2200638 ] {} <Fatal> BaseDaemon: Address: 0x20 Access: read. Address not mapped to object.
2020.10.14 20:18:20.124446 [ 2200638 ] {} <Fatal> BaseDaemon: Stack trace: 0x27cbc1c9 0x27cb961c 0x27cb7ad3 0x2765b6a7 0x27671429 0x276323a4 0x2762d166 0x2762abb9 0x27d812d1 0x27d7e389 0x274abf5d 0x274a9d52 0x282f5859 0x282f3553 0x29d352ea 0x29d494ba 0x2d375304 0x2d375ef7 0x2d6e9b2e 0x2d6e1c5f 0x2d6df49c 0x7f3e14b36609 0x7f3e14a4c103
2020.10.14 20:18:20.209171 [ 2200638 ] {} <Fatal> BaseDaemon: 4. /home/jakalletti/ClickHouse/ClickHouse/src/Interpreters/ExpressionAnalyzer.cpp:428: DB::ExpressionAnalyzer::makeAggregateDescriptions(std::__1::shared_ptr<DB::ActionsDAG>&) @ 0x27cbc1c9 in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:20.287922 [ 2200638 ] {} <Fatal> BaseDaemon: 5. /home/jakalletti/ClickHouse/ClickHouse/src/Interpreters/ExpressionAnalyzer.cpp:208: DB::ExpressionAnalyzer::analyzeAggregation() @ 0x27cb961c in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:20.354517 [ 2200638 ] {} <Fatal> BaseDaemon: 6. /home/jakalletti/ClickHouse/ClickHouse/src/Interpreters/ExpressionAnalyzer.cpp:136: DB::ExpressionAnalyzer::ExpressionAnalyzer(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::TreeRewriterResult const> const&, DB::Context const&, unsigned long, bool) @ 0x27cb7ad3 in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:20.425812 [ 2200638 ] {} <Fatal> BaseDaemon: 7. /home/jakalletti/ClickHouse/ClickHouse/src/Interpreters/ExpressionAnalyzer.h:248: DB::SelectQueryExpressionAnalyzer::SelectQueryExpressionAnalyzer(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::TreeRewriterResult const> const&, DB::Context const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::__1::unordered_set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, bool, DB::SelectQueryOptions const&) @ 0x2765b6a7 in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:20.501785 [ 2200638 ] {} <Fatal> BaseDaemon: 8. /home/jakalletti/ClickHouse/ClickHouse/contrib/libcxx/include/memory:3028: std::__1::__unique_if<DB::SelectQueryExpressionAnalyzer>::__unique_single std::__1::make_unique<DB::SelectQueryExpressionAnalyzer, std::__1::shared_ptr<DB::IAST>&, std::__1::shared_ptr<DB::TreeRewriterResult const>&, DB::Context&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const>&, std::__1::unordered_set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, bool, DB::SelectQueryOptions&>(std::__1::shared_ptr<DB::IAST>&, std::__1::shared_ptr<DB::TreeRewriterResult const>&, DB::Context&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const>&, std::__1::unordered_set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&&, bool&&, DB::SelectQueryOptions&) @ 0x27671429 in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:20.573236 [ 2200638 ] {} <Fatal> BaseDaemon: 9. /home/jakalletti/ClickHouse/ClickHouse/src/Interpreters/InterpreterSelectQuery.cpp:344: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, std::__1::shared_ptr<DB::IBlockInputStream> const&, std::__1::optional<DB::Pipe>, std::__1::shared_ptr<DB::IStorage> const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&)::$_2::operator()(bool) const @ 0x276323a4 in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:20.646941 [ 2200638 ] {} <Fatal> BaseDaemon: 10. /home/jakalletti/ClickHouse/ClickHouse/src/Interpreters/InterpreterSelectQuery.cpp:405: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, std::__1::shared_ptr<DB::IBlockInputStream> const&, std::__1::optional<DB::Pipe>, std::__1::shared_ptr<DB::IStorage> const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&) @ 0x2762d166 in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:20.711369 [ 2200638 ] {} <Fatal> BaseDaemon: 11. /home/jakalletti/ClickHouse/ClickHouse/src/Interpreters/InterpreterSelectQuery.cpp:146: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0x2762abb9 in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:20.779259 [ 2200638 ] {} <Fatal> BaseDaemon: 12. /home/jakalletti/ClickHouse/ClickHouse/contrib/libcxx/include/memory:3028: std::__1::__unique_if<DB::InterpreterSelectQuery>::__unique_single std::__1::make_unique<DB::InterpreterSelectQuery, std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::SelectQueryOptions&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&>(std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::SelectQueryOptions&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0x27d812d1 in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:20.846930 [ 2200638 ] {} <Fatal> BaseDaemon: 13. /home/jakalletti/ClickHouse/ClickHouse/src/Interpreters/InterpreterSelectWithUnionQuery.cpp:84: DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::__1::shared_ptr<DB::IAST> const&, DB::Context const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0x27d7e389 in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:20.916136 [ 2200638 ] {} <Fatal> BaseDaemon: 14. /home/jakalletti/ClickHouse/ClickHouse/contrib/libcxx/include/memory:3028: std::__1::__unique_if<DB::InterpreterSelectWithUnionQuery>::__unique_single std::__1::make_unique<DB::InterpreterSelectWithUnionQuery, std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::SelectQueryOptions>(std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::SelectQueryOptions&&) @ 0x274abf5d in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:20.985693 [ 2200638 ] {} <Fatal> BaseDaemon: 15. /home/jakalletti/ClickHouse/ClickHouse/src/Interpreters/InterpreterFactory.cpp:107: DB::InterpreterFactory::get(std::__1::shared_ptr<DB::IAST>&, DB::Context&, DB::QueryProcessingStage::Enum) @ 0x274a9d52 in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:21.062902 [ 2200638 ] {} <Fatal> BaseDaemon: 16. /home/jakalletti/ClickHouse/ClickHouse/src/Interpreters/executeQuery.cpp:402: DB::executeQueryImpl(char const*, char const*, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool, DB::ReadBuffer*) @ 0x282f5859 in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:21.146358 [ 2200638 ] {} <Fatal> BaseDaemon: 17. /home/jakalletti/ClickHouse/ClickHouse/src/Interpreters/executeQuery.cpp:718: DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool) @ 0x282f3553 in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:21.243889 [ 2200638 ] {} <Fatal> BaseDaemon: 18. /home/jakalletti/ClickHouse/ClickHouse/src/Server/TCPHandler.cpp:254: DB::TCPHandler::runImpl() @ 0x29d352ea in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:21.335587 [ 2200638 ] {} <Fatal> BaseDaemon: 19. /home/jakalletti/ClickHouse/ClickHouse/src/Server/TCPHandler.cpp:1306: DB::TCPHandler::run() @ 0x29d494ba in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:21.432322 [ 2200638 ] {} <Fatal> BaseDaemon: 20. /home/jakalletti/ClickHouse/ClickHouse/contrib/poco/Net/src/TCPServerConnection.cpp:43: Poco::Net::TCPServerConnection::start() @ 0x2d375304 in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:21.542884 [ 2200638 ] {} <Fatal> BaseDaemon: 21. /home/jakalletti/ClickHouse/ClickHouse/contrib/poco/Net/src/TCPServerDispatcher.cpp:114: Poco::Net::TCPServerDispatcher::run() @ 0x2d375ef7 in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:21.655793 [ 2200638 ] {} <Fatal> BaseDaemon: 22. /home/jakalletti/ClickHouse/ClickHouse/contrib/poco/Foundation/src/ThreadPool.cpp:199: Poco::PooledThread::run() @ 0x2d6e9b2e in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:21.749871 [ 2200638 ] {} <Fatal> BaseDaemon: 23. /home/jakalletti/ClickHouse/ClickHouse/contrib/poco/Foundation/src/Thread.cpp:56: Poco::(anonymous namespace)::RunnableHolder::run() @ 0x2d6e1c5f in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:21.840841 [ 2200638 ] {} <Fatal> BaseDaemon: 24. /home/jakalletti/ClickHouse/ClickHouse/contrib/poco/Foundation/src/Thread_POSIX.cpp:345: Poco::ThreadImpl::runnableEntry(void*) @ 0x2d6df49c in /home/jakalletti/ClickHouse/build/memory/programs/clickhouse
2020.10.14 20:18:21.841116 [ 2200638 ] {} <Fatal> BaseDaemon: 25. start_thread @ 0x9609 in /lib/x86_64-linux-gnu/libpthread-2.31.so
2020.10.14 20:18:21.841633 [ 2200638 ] {} <Fatal> BaseDaemon: 26. /build/glibc-YYA7BZ/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:97: __clone @ 0x122103 in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so

```

{
    if (hasFilter())
        filter_info->actions->prependProjectInput();
    if (hasWhere())
        before_where->prependProjectInput();
    if (hasHaving())
        before_having->prependProjectInput();
}
void ExpressionAnalysisResult::checkActions() const
{
    
    if (hasPrewhere())
    {
        auto check_actions = [](const ExpressionActionsPtr & actions)
        {
            if (actions)
                for (const auto & action : actions->getActions())
                    if (action.type == ExpressionAction::Type::ARRAY_JOIN)
                        throw Exception("PREWHERE cannot contain ARRAY JOIN action", ErrorCodes::ILLEGAL_PREWHERE);
        };
        check_actions(prewhere_info->prewhere_actions);
        check_actions(prewhere_info->alias_actions);
        check_actions(prewhere_info->remove_columns_actions);
    }
}
}