https://clickhouse-test-reports.s3.yandex.net/26845/fd19f473115b97bb66c4cc65751fc631b0e8c413/fuzzer_debug/report.html#fail1
```
SELECT cityHash64(number GLOBAL IN (NULL, -2147483648, -9223372036854775808), nan, 1024, NULL, NULL, 1.000100016593933, NULL), (NULL, cityHash64(inf, -2147483648, NULL, NULL, 10.000100135803223), cityHash64(1.1754943508222875e-38, NULL, NULL, NULL), 2147483647) FROM cluster(test_cluster_two_shards_localhost, numbers((NULL, cityHash64(0., 65536, NULL, NULL, 10000000000., NULL), 0) GLOBAL IN (number), 65536)) WHERE number GLOBAL IN [1025]

2021.07.28 22:59:59.095567 [ 50 ] {783c7fc3-a8a3-42da-ab33-06ea6e4cab1d} <Fatal> : Logical error: 'Table expression is undefined, Method: ExpressionAnalyzer::interpretSubquery.'.
2021.07.28 22:59:59.096486 [ 272 ] {} <Fatal> BaseDaemon: ########################################
2021.07.28 22:59:59.096816 [ 272 ] {} <Fatal> BaseDaemon: (version 21.9.1.7603, build id: 2C25A59FFC0714F805854A8E5B791CF46C301BF6) (from thread 50) (query_id: 783c7fc3-a8a3-42da-ab33-06ea6e4cab1d) Received signal Aborted (6)
2021.07.28 22:59:59.097063 [ 272 ] {} <Fatal> BaseDaemon: 
2021.07.28 22:59:59.097396 [ 272 ] {} <Fatal> BaseDaemon: Stack trace: 0x7f8dbe86918b 0x7f8dbe848859 0x12fc31e6 0x12fc32f5 0x1e54c0ab 0x1e54bda9 0x1dbd436b 0x1dbd3b40 0x1dbd3741 0x1dbc2f9e 0x1dbd36d6 0x1dbc2f86 0x1dbd36d6 0x1dbc2f86 0x1dbd36d6 0x1dbc2f86 0x1dbd36d6 0x1dbc2f86 0x1dbd36d6 0x1dbc2f86 0x1dbd36d6 0x1dbc2f86 0x1dbd36d6 0x1dbc2f86 0x1dbd36d6 0x1dbc2f86 0x1dbb0f6b 0x1dbb0d8c 0x1df36923 0x1df3ee95 0x1df20733 0x1df1dc1f 0x1df1c7cc 0x1e2bd735 0x1e2bb5b6 0x1e2bae29 0x1db8fc89 0x1db8e3e6 0x1e5312b7 0x1e52f805 0x1f0ce21c
2021.07.28 22:59:59.097832 [ 272 ] {} <Fatal> BaseDaemon: 4. raise @ 0x4618b in /usr/lib/x86_64-linux-gnu/libc-2.31.so
2021.07.28 22:59:59.097967 [ 272 ] {} <Fatal> BaseDaemon: 5. abort @ 0x25859 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
2021.07.28 22:59:59.331811 [ 272 ] {} <Fatal> BaseDaemon: 6. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:53: DB::handle_error_code(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool, std::__1::vector<void*, std::__1::allocator<void*> > const&) @ 0x12fc31e6 in /workspace/clickhouse
2021.07.28 22:59:59.555276 [ 272 ] {} <Fatal> BaseDaemon: 7. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:60: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x12fc32f5 in /workspace/clickhouse
2021.07.28 22:59:59.865943 [ 272 ] {} <Fatal> BaseDaemon: 8. ./obj-x86_64-linux-gnu/../src/Interpreters/interpretSubquery.cpp:53: DB::interpretSubquery(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context 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&, DB::SelectQueryOptions const&) @ 0x1e54c0ab in /workspace/clickhouse
2021.07.28 23:00:00.177696 [ 272 ] {} <Fatal> BaseDaemon: 9. ./obj-x86_64-linux-gnu/../src/Interpreters/interpretSubquery.cpp:28: DB::interpretSubquery(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>, unsigned long, 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&) @ 0x1e54bda9 in /workspace/clickhouse
2021.07.28 23:00:00.837509 [ 272 ] {} <Fatal> BaseDaemon: 10. ./obj-x86_64-linux-gnu/../src/Interpreters/GlobalSubqueriesVisitor.h:107: DB::GlobalSubqueriesMatcher::Data::addExternalStorage(std::__1::shared_ptr<DB::IAST>&, bool) @ 0x1dbd436b in /workspace/clickhouse
2021.07.28 23:00:01.572200 [ 272 ] {} <Fatal> BaseDaemon: 11. ./obj-x86_64-linux-gnu/../src/Interpreters/GlobalSubqueriesVisitor.h:217: DB::GlobalSubqueriesMatcher::visit(DB::ASTFunction&, std::__1::shared_ptr<DB::IAST>&, DB::GlobalSubqueriesMatcher::Data&) @ 0x1dbd3b40 in /workspace/clickhouse
2021.07.28 23:00:02.296579 [ 272 ] {} <Fatal> BaseDaemon: 12. ./obj-x86_64-linux-gnu/../src/Interpreters/GlobalSubqueriesVisitor.h:181: DB::GlobalSubqueriesMatcher::visit(std::__1::shared_ptr<DB::IAST>&, DB::GlobalSubqueriesMatcher::Data&) @ 0x1dbd3741 in /workspace/clickhouse
2021.07.28 23:00:02.963217 [ 272 ] {} <Fatal> BaseDaemon: 13. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:34: DB::InDepthNodeVisitor<DB::GlobalSubqueriesMatcher, false, std::__1::shared_ptr<DB::IAST> >::visit(std::__1::shared_ptr<DB::IAST>&) @ 0x1dbc2f9e in /workspace/clickhouse
2021.07.28 23:00:03.691926 [ 272 ] {} <Fatal> BaseDaemon: 14. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:53: DB::InDepthNodeVisitor<DB::GlobalSubqueriesMatcher, false, std::__1::shared_ptr<DB::IAST> >::visitChildren(std::__1::shared_ptr<DB::IAST>&) @ 0x1dbd36d6 in /workspace/clickhouse
2021.07.28 23:00:04.371135 [ 272 ] {} <Fatal> BaseDaemon: 15. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:30: DB::InDepthNodeVisitor<DB::GlobalSubqueriesMatcher, false, std::__1::shared_ptr<DB::IAST> >::visit(std::__1::shared_ptr<DB::IAST>&) @ 0x1dbc2f86 in /workspace/clickhouse
2021.07.28 23:00:05.103704 [ 272 ] {} <Fatal> BaseDaemon: 16. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:53: DB::InDepthNodeVisitor<DB::GlobalSubqueriesMatcher, false, std::__1::shared_ptr<DB::IAST> >::visitChildren(std::__1::shared_ptr<DB::IAST>&) @ 0x1dbd36d6 in /workspace/clickhouse
2021.07.28 23:00:05.801674 [ 272 ] {} <Fatal> BaseDaemon: 17. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:30: DB::InDepthNodeVisitor<DB::GlobalSubqueriesMatcher, false, std::__1::shared_ptr<DB::IAST> >::visit(std::__1::shared_ptr<DB::IAST>&) @ 0x1dbc2f86 in /workspace/clickhouse
2021.07.28 23:00:06.520497 [ 272 ] {} <Fatal> BaseDaemon: 18. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:53: DB::InDepthNodeVisitor<DB::GlobalSubqueriesMatcher, false, std::__1::shared_ptr<DB::IAST> >::visitChildren(std::__1::shared_ptr<DB::IAST>&) @ 0x1dbd36d6 in /workspace/clickhouse
2021.07.28 23:00:07.186198 [ 272 ] {} <Fatal> BaseDaemon: 19. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:30: DB::InDepthNodeVisitor<DB::GlobalSubqueriesMatcher, false, std::__1::shared_ptr<DB::IAST> >::visit(std::__1::shared_ptr<DB::IAST>&) @ 0x1dbc2f86 in /workspace/clickhouse
2021.07.28 23:00:07.911978 [ 272 ] {} <Fatal> BaseDaemon: 20. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:53: DB::InDepthNodeVisitor<DB::GlobalSubqueriesMatcher, false, std::__1::shared_ptr<DB::IAST> >::visitChildren(std::__1::shared_ptr<DB::IAST>&) @ 0x1dbd36d6 in /workspace/clickhouse
2021.07.28 23:00:08.576166 [ 272 ] {} <Fatal> BaseDaemon: 21. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:30: DB::InDepthNodeVisitor<DB::GlobalSubqueriesMatcher, false, std::__1::shared_ptr<DB::IAST> >::visit(std::__1::shared_ptr<DB::IAST>&) @ 0x1dbc2f86 in /workspace/clickhouse
2021.07.28 23:00:09.309604 [ 272 ] {} <Fatal> BaseDaemon: 22. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:53: DB::InDepthNodeVisitor<DB::GlobalSubqueriesMatcher, false, std::__1::shared_ptr<DB::IAST> >::visitChildren(std::__1::shared_ptr<DB::IAST>&) @ 0x1dbd36d6 in /workspace/clickhouse
2021.07.28 23:00:09.974822 [ 272 ] {} <Fatal> BaseDaemon: 23. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:30: DB::InDepthNodeVisitor<DB::GlobalSubqueriesMatcher, false, std::__1::shared_ptr<DB::IAST> >::visit(std::__1::shared_ptr<DB::IAST>&) @ 0x1dbc2f86 in /workspace/clickhouse
2021.07.28 23:00:10.694166 [ 272 ] {} <Fatal> BaseDaemon: 24. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:53: DB::InDepthNodeVisitor<DB::GlobalSubqueriesMatcher, false, std::__1::shared_ptr<DB::IAST> >::visitChildren(std::__1::shared_ptr<DB::IAST>&) @ 0x1dbd36d6 in /workspace/clickhouse
2021.07.28 23:00:11.367663 [ 272 ] {} <Fatal> BaseDaemon: 25. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:30: DB::InDepthNodeVisitor<DB::GlobalSubqueriesMatcher, false, std::__1::shared_ptr<DB::IAST> >::visit(std::__1::shared_ptr<DB::IAST>&) @ 0x1dbc2f86 in /workspace/clickhouse
2021.07.28 23:00:12.085934 [ 272 ] {} <Fatal> BaseDaemon: 26. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:53: DB::InDepthNodeVisitor<DB::GlobalSubqueriesMatcher, false, std::__1::shared_ptr<DB::IAST> >::visitChildren(std::__1::shared_ptr<DB::IAST>&) @ 0x1dbd36d6 in /workspace/clickhouse
2021.07.28 23:00:12.750364 [ 272 ] {} <Fatal> BaseDaemon: 27. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:30: DB::InDepthNodeVisitor<DB::GlobalSubqueriesMatcher, false, std::__1::shared_ptr<DB::IAST> >::visit(std::__1::shared_ptr<DB::IAST>&) @ 0x1dbc2f86 in /workspace/clickhouse
2021.07.28 23:00:13.471010 [ 272 ] {} <Fatal> BaseDaemon: 28. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:53: DB::InDepthNodeVisitor<DB::GlobalSubqueriesMatcher, false, std::__1::shared_ptr<DB::IAST> >::visitChildren(std::__1::shared_ptr<DB::IAST>&) @ 0x1dbd36d6 in /workspace/clickhouse
2021.07.28 23:00:14.137413 [ 272 ] {} <Fatal> BaseDaemon: 29. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:30: DB::InDepthNodeVisitor<DB::GlobalSubqueriesMatcher, false, std::__1::shared_ptr<DB::IAST> >::visit(std::__1::shared_ptr<DB::IAST>&) @ 0x1dbc2f86 in /workspace/clickhouse
2021.07.28 23:00:14.802412 [ 272 ] {} <Fatal> BaseDaemon: 30. ./obj-x86_64-linux-gnu/../src/Interpreters/ExpressionAnalyzer.cpp:312: DB::ExpressionAnalyzer::initGlobalSubqueriesAndExternalTables(bool) @ 0x1dbb0f6b in /workspace/clickhouse
2021.07.28 23:00:15.466182 [ 272 ] {} <Fatal> BaseDaemon: 31. ./obj-x86_64-linux-gnu/../src/Interpreters/ExpressionAnalyzer.cpp:152: DB::ExpressionAnalyzer::ExpressionAnalyzer(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::TreeRewriterResult const> const&, std::__1::shared_ptr<DB::Context const>, unsigned long, bool, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, DB::SubqueryForSet, 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::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, DB::SubqueryForSet> > >, std::__1::unordered_map<DB::PreparedSetKey, std::__1::shared_ptr<DB::Set>, DB::PreparedSetKey::Hash, std::__1::equal_to<DB::PreparedSetKey>, std::__1::allocator<std::__1::pair<DB::PreparedSetKey const, std::__1::shared_ptr<DB::Set> > > >) @ 0x1dbb0d8c in /workspace/clickhouse
2021.07.28 23:00:16.457592 [ 272 ] {} <Fatal> BaseDaemon: 32. ./obj-x86_64-linux-gnu/../src/Interpreters/ExpressionAnalyzer.h:292: DB::SelectQueryExpressionAnalyzer::SelectQueryExpressionAnalyzer(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::TreeRewriterResult const> const&, std::__1::shared_ptr<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&, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, DB::SubqueryForSet, 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::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, DB::SubqueryForSet> > >, std::__1::unordered_map<DB::PreparedSetKey, std::__1::shared_ptr<DB::Set>, DB::PreparedSetKey::Hash, std::__1::equal_to<DB::PreparedSetKey>, std::__1::allocator<std::__1::pair<DB::PreparedSetKey const, std::__1::shared_ptr<DB::Set> > > >) @ 0x1df36923 in /workspace/clickhouse
2021.07.28 23:00:17.610224 [ 272 ] {} <Fatal> BaseDaemon: 33. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:2068: 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>&, std::__1::shared_ptr<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::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, DB::SubqueryForSet, 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::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, DB::SubqueryForSet> > >, std::__1::unordered_map<DB::PreparedSetKey, std::__1::shared_ptr<DB::Set>, DB::PreparedSetKey::Hash, std::__1::equal_to<DB::PreparedSetKey>, std::__1::allocator<std::__1::pair<DB::PreparedSetKey const, std::__1::shared_ptr<DB::Set> > > > >(std::__1::shared_ptr<DB::IAST>&, std::__1::shared_ptr<DB::TreeRewriterResult const>&, std::__1::shared_ptr<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::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, DB::SubqueryForSet, 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::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, DB::SubqueryForSet> > >&&, std::__1::unordered_map<DB::PreparedSetKey, std::__1::shared_ptr<DB::Set>, DB::PreparedSetKey::Hash, std::__1::equal_to<DB::PreparedSetKey>, std::__1::allocator<std::__1::pair<DB::PreparedSetKey const, std::__1::shared_ptr<DB::Set> > > >&&) @ 0x1df3ee95 in /workspace/clickhouse
2021.07.28 23:00:18.600344 [ 272 ] {} <Fatal> BaseDaemon: 34. ./obj-x86_64-linux-gnu/../src/Interpreters/InterpreterSelectQuery.cpp:437: DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<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&)::$_1::operator()(bool) const @ 0x1df20733 in /workspace/clickhouse
```
StorageID("", temporary_table_name), Context::ResolveExternal));
                if (exists_in_local_map || exists_in_context)
                    return;
            }
            String external_table_name = subquery_or_table_name->tryGetAlias();
            if (external_table_name.empty())
            {
                
                external_table_name = "_data" + toString(external_table_id);
                while (external_tables.count(external_table_name))
                {
                    ++external_table_id;
                    external_table_name = "_data" + toString(external_table_id);
                }
            }
            auto interpreter = interpretSubquery(subquery_or_table_name, getContext(), subquery_depth, {});
            Block sample = interpreter->getSampleBlock();
            NamesAndTypesList columns = sample.getNamesAndTypesList();
            auto external_storage_holder = std::make_shared<TemporaryTableHolder>(
                getContext(),
                ColumnsDescription{columns},
                ConstraintsDescription{},
                nullptr,
                 true);
            StoragePtr external_storage = external_storage_holder->getTable();
            /** We replace the subquery with the name of the temporary table.
                * It is in this form, the request will go to the remote server.
                * This temporary table will go to the remote server, and on its side,
                *  instead of doing a subquery, you just need to read it.
                */