**Describe the bug**
[A link to the report
](https://s3.amazonaws.com/clickhouse-test-reports/0/4dd41cc1b73ee55f2174b27a8cd43e2f1b87b87e/fuzzer_astfuzzerubsan//report.html)

**How to reproduce**
```sql
DROP TABLE IF EXISTS bloom_filter_nullable_index__fuzz_0;
CREATE TABLE bloom_filter_nullable_index__fuzz_0
(
    `order_key` UInt64,
    `str` Nullable(String),
    INDEX idx str TYPE bloom_filter GRANULARITY 1
)
ENGINE = MergeTree ORDER BY order_key SETTINGS index_granularity = 6;

INSERT INTO bloom_filter_nullable_index__fuzz_0 VALUES (1, 'test');
INSERT INTO bloom_filter_nullable_index__fuzz_0 VALUES (2, 'test2');

DROP TABLE IF EXISTS nullable_string_value__fuzz_2;
CREATE TABLE nullable_string_value__fuzz_2 (`value` LowCardinality(String)) ENGINE = TinyLog;
INSERT INTO nullable_string_value__fuzz_2 VALUES ('test');

SELECT * FROM bloom_filter_nullable_index__fuzz_0 WHERE str IN (SELECT value FROM nullable_string_value__fuzz_2);
```

```
2022.10.18 20:52:08.844808 [ 211659 ] <Fatal> BaseDaemon: ########################################
2022.10.18 20:52:08.844875 [ 211659 ] <Fatal> BaseDaemon: (version 22.10.1.1, build id: 040027BAD4DF758DF500DDEC7A9B6FD5BEEB3F32) (from thread 211310) (query_id: 9029dded-e0e9-4080-8d83-0581cdbaa69e) (query: SELECT * FROM bloom_filter_nullable_index__fuzz_0 WHERE str IN (SELECT value FROM nullable_string_value__fuzz_2);) Received signal Segmentation fault (11)
2022.10.18 20:52:08.844900 [ 211659 ] <Fatal> BaseDaemon: Address: 0x10 Access: read. Address not mapped to object.
2022.10.18 20:52:08.844939 [ 211659 ] <Fatal> BaseDaemon: Stack trace: 0xb7dba08 0xb7db7ac 0xb514633 0x141e3787 0x141e3fc8 0x141e50aa 0xb50c38d 0x15281111 0x15b00bb7 0x15afee75 0x15afe141 0x15afdfaf 0x15b01d7d 0x15b0b794 0x15b02205 0x15afceff 0x15af59f6 0x15acc639 0x160afe2e 0x160ae4dd 0x160b13fd 0x160b1573 0x1608538f 0x1609dbbe 0x1503b794 0x152a0fb6 0x1529e5f0 0x15d5e145 0x15d6d419 0x1813f907 0x1813fdef 0x182b2c07 0x182b07cf 0x7f5162620609 0x7f5162545163
2022.10.18 20:52:09.427836 [ 211659 ] <Fatal> BaseDaemon: 3. DB::FunctionCast<DB::CastInternalName>::prepareUnpackDictionaries(std::__1::shared_ptr<DB::IDataType const> const&, std::__1::shared_ptr<DB::IDataType const> const&) const::'lambda0'(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNullable const*, unsigned long)::operator()(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNullable const*, unsigned long) const @ 0xb7dba08 in /usr/local/bin/clickhouse
2022.10.18 20:52:09.980886 [ 211659 ] <Fatal> BaseDaemon: 4. COW<DB::IColumn>::immutable_ptr<DB::IColumn> std::__1::__function::__policy_invoker<COW<DB::IColumn>::immutable_ptr<DB::IColumn> (std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNullable const*, unsigned long)>::__call_impl<std::__1::__function::__default_alloc_func<DB::FunctionCast<DB::CastInternalName>::prepareUnpackDictionaries(std::__1::shared_ptr<DB::IDataType const> const&, std::__1::shared_ptr<DB::IDataType const> const&) const::'lambda0'(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNullable const*, unsigned long), COW<DB::IColumn>::immutable_ptr<DB::IColumn> (std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNullable const*, unsigned long)> >(std::__1::__function::__policy_storage const*, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >&, std::__1::shared_ptr<DB::IDataType const> const&, DB::ColumnNullable const*, unsigned long) @ 0xb7db7ac in /usr/local/bin/clickhouse
2022.10.18 20:52:10.534278 [ 211659 ] <Fatal> BaseDaemon: 5. DB::ExecutableFunctionCast::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0xb514633 in /usr/local/bin/clickhouse
2022.10.18 20:52:10.543808 [ 211659 ] <Fatal> BaseDaemon: 6. ./build_clang/./src/Functions/IFunction.cpp:0: DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x141e3787 in /usr/local/bin/clickhouse
2022.10.18 20:52:10.553072 [ 211659 ] <Fatal> BaseDaemon: 7.1. inlined from ./build_clang/./contrib/boost/boost/smart_ptr/intrusive_ptr.hpp:115: intrusive_ptr
2022.10.18 20:52:10.553097 [ 211659 ] <Fatal> BaseDaemon: 7.2. inlined from ./build_clang/./contrib/boost/boost/smart_ptr/intrusive_ptr.hpp:122: boost::intrusive_ptr<DB::IColumn const>::operator=(boost::intrusive_ptr<DB::IColumn const>&&)
2022.10.18 20:52:10.553119 [ 211659 ] <Fatal> BaseDaemon: 7.3. inlined from ./build_clang/./src/Common/COW.h:136: COW<DB::IColumn>::immutable_ptr<DB::IColumn>::operator=(COW<DB::IColumn>::immutable_ptr<DB::IColumn>&&)
2022.10.18 20:52:10.553136 [ 211659 ] <Fatal> BaseDaemon: 7. ./build_clang/./src/Functions/IFunction.cpp:306: DB::IExecutableFunction::executeWithoutSparseColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x141e3fc8 in /usr/local/bin/clickhouse
2022.10.18 20:52:10.562574 [ 211659 ] <Fatal> BaseDaemon: 8.1. inlined from ./build_clang/./contrib/libcxx/include/vector:399: ~vector
2022.10.18 20:52:10.562602 [ 211659 ] <Fatal> BaseDaemon: 8. ./build_clang/./src/Functions/IFunction.cpp:373: DB::IExecutableFunction::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x141e50aa in /usr/local/bin/clickhouse
2022.10.18 20:52:11.115497 [ 211659 ] <Fatal> BaseDaemon: 9. DB::IFunctionBase::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0xb50c38d in /usr/local/bin/clickhouse
2022.10.18 20:52:11.553754 [ 211659 ] <Fatal> BaseDaemon: 10.1. inlined from ./build_clang/./contrib/libcxx/include/__memory/shared_ptr.h:702: ~shared_ptr
2022.10.18 20:52:11.553810 [ 211659 ] <Fatal> BaseDaemon: 10.2. inlined from ./build_clang/./src/Interpreters/castColumn.cpp:37: COW<DB::IColumn>::immutable_ptr<DB::IColumn> DB::castColumn<(DB::CastType)0>(DB::ColumnWithTypeAndName const&, std::__1::shared_ptr<DB::IDataType const> const&)
2022.10.18 20:52:11.553838 [ 211659 ] <Fatal> BaseDaemon: 10. ./build_clang/./src/Interpreters/castColumn.cpp:41: DB::castColumn(DB::ColumnWithTypeAndName const&, std::__1::shared_ptr<DB::IDataType const> const&) @ 0x15281111 in /usr/local/bin/clickhouse
2022.10.18 20:52:11.572964 [ 211659 ] <Fatal> BaseDaemon: 11.1. inlined from ./build_clang/./contrib/libcxx/include/string:1445: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__is_long() const
2022.10.18 20:52:11.572988 [ 211659 ] <Fatal> BaseDaemon: 11.2. inlined from ./build_clang/./contrib/libcxx/include/string:2231: ~basic_string
2022.10.18 20:52:11.573009 [ 211659 ] <Fatal> BaseDaemon: 11.3. inlined from ./build_clang/./src/Core/ColumnWithTypeAndName.h:19: ~ColumnWithTypeAndName
2022.10.18 20:52:11.573060 [ 211659 ] <Fatal> BaseDaemon: 11. ./build_clang/./src/Storages/MergeTree/MergeTreeIndexConditionBloomFilter.cpp:346: DB::MergeTreeIndexConditionBloomFilter::traverseASTIn(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Set> const&, std::__1::shared_ptr<DB::IDataType const> const&, COW<DB::IColumn>::immutable_ptr<DB::IColumn> const&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&) @ 0x15b00bb7 in /usr/local/bin/clickhouse
2022.10.18 20:52:11.589644 [ 211659 ] <Fatal> BaseDaemon: 12. ./build_clang/./src/Storages/MergeTree/MergeTreeIndexConditionBloomFilter.cpp:0: DB::MergeTreeIndexConditionBloomFilter::traverseASTIn(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Set> const&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&) @ 0x15afee75 in /usr/local/bin/clickhouse
2022.10.18 20:52:11.605805 [ 211659 ] <Fatal> BaseDaemon: 13. ./build_clang/./src/Storages/MergeTree/MergeTreeIndexConditionBloomFilter.cpp:293: DB::MergeTreeIndexConditionBloomFilter::traverseFunction(std::__1::shared_ptr<DB::IAST> const&, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&, std::__1::shared_ptr<DB::IAST> const&) @ 0x15afe141 in /usr/local/bin/clickhouse
2022.10.18 20:52:11.621736 [ 211659 ] <Fatal> BaseDaemon: 14. ./build_clang/./src/Storages/MergeTree/MergeTreeIndexConditionBloomFilter.cpp:266: DB::MergeTreeIndexConditionBloomFilter::traverseAtomAST(std::__1::shared_ptr<DB::IAST> const&, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&) @ 0x15afdfaf in /usr/local/bin/clickhouse
2022.10.18 20:52:11.695216 [ 211659 ] <Fatal> BaseDaemon: 15.1. inlined from ./build_clang/./src/Storages/MergeTree/MergeTreeIndexConditionBloomFilter.cpp:0: operator()<const std::__1::shared_ptr<DB::IAST>, std::__1::shared_ptr<const DB::Context>, DB::Block, DB::MergeTreeIndexConditionBloomFilter::RPNElement>
2022.10.18 20:52:11.695251 [ 211659 ] <Fatal> BaseDaemon: 15.2. inlined from ./build_clang/./contrib/libcxx/include/type_traits:3640: decltype(static_cast<DB::MergeTreeIndexConditionBloomFilter::MergeTreeIndexConditionBloomFilter(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>, DB::Block const&, unsigned long)::$_3&>(fp)(static_cast<std::__1::shared_ptr<DB::IAST> const&>(fp0), static_cast<std::__1::shared_ptr<DB::Context const>>(fp0), static_cast<DB::Block&>(fp0), static_cast<DB::MergeTreeIndexConditionBloomFilter::RPNElement&>(fp0))) std::__1::__invoke<DB::MergeTreeIndexConditionBloomFilter::MergeTreeIndexConditionBloomFilter(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>, DB::Block const&, unsigned long)::$_3&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&>(DB::MergeTreeIndexConditionBloomFilter::MergeTreeIndexConditionBloomFilter(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>, DB::Block const&, unsigned long)::$_3&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>&&, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&)
2022.10.18 20:52:11.695281 [ 211659 ] <Fatal> BaseDaemon: 15.3. inlined from ./build_clang/./contrib/libcxx/include/__functional/invoke.h:30: bool std::__1::__invoke_void_return_wrapper<bool, false>::__call<DB::MergeTreeIndexConditionBloomFilter::MergeTreeIndexConditionBloomFilter(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>, DB::Block const&, unsigned long)::$_3&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&>(DB::MergeTreeIndexConditionBloomFilter::MergeTreeIndexConditionBloomFilter(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>, DB::Block const&, unsigned long)::$_3&, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>&&, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&)
2022.10.18 20:52:11.695338 [ 211659 ] <Fatal> BaseDaemon: 15.4. inlined from ./build_clang/./contrib/libcxx/include/__functional/function.h:230: std::__1::__function::__default_alloc_func<DB::MergeTreeIndexConditionBloomFilter::MergeTreeIndexConditionBloomFilter(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>, DB::Block const&, unsigned long)::$_3, bool (std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&)>::operator()(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>&&, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&)
2022.10.18 20:52:11.695376 [ 211659 ] <Fatal> BaseDaemon: 15. ./build_clang/./contrib/libcxx/include/__functional/function.h:711: bool std::__1::__function::__policy_invoker<bool (std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&)>::__call_impl<std::__1::__function::__default_alloc_func<DB::MergeTreeIndexConditionBloomFilter::MergeTreeIndexConditionBloomFilter(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>, DB::Block const&, unsigned long)::$_3, bool (std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&)> >(std::__1::__function::__policy_storage const*, std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>&&, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&) @ 0x15b01d7d in /usr/local/bin/clickhouse
2022.10.18 20:52:11.711886 [ 211659 ] <Fatal> BaseDaemon: 16.1. inlined from ./build_clang/./contrib/libcxx/include/__functional/function.h:0: std::__1::function<bool (std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&)>::operator()(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&) const
2022.10.18 20:52:11.711910 [ 211659 ] <Fatal> BaseDaemon: 16. ./build_clang/./src/Storages/MergeTree/RPNBuilder.h:82: DB::RPNBuilder<DB::MergeTreeIndexConditionBloomFilter::RPNElement>::traverseAST(std::__1::shared_ptr<DB::IAST> const&) @ 0x15b0b794 in /usr/local/bin/clickhouse
2022.10.18 20:52:11.726374 [ 211659 ] <Fatal> BaseDaemon: 17.1. inlined from ./build_clang/./contrib/libcxx/include/__memory/shared_ptr.h:702: ~shared_ptr
2022.10.18 20:52:11.726419 [ 211659 ] <Fatal> BaseDaemon: 17. ./build_clang/./src/Storages/MergeTree/RPNBuilder.h:47: DB::RPNBuilder<DB::MergeTreeIndexConditionBloomFilter::RPNElement>::RPNBuilder(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>, std::__1::function<bool (std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>, DB::Block&, DB::MergeTreeIndexConditionBloomFilter::RPNElement&)> const&) @ 0x15b02205 in /usr/local/bin/clickhouse
2022.10.18 20:52:11.739907 [ 211659 ] <Fatal> BaseDaemon: 18.1. inlined from ./build_clang/./src/Storages/MergeTree/RPNBuilder.h:55: DB::RPNBuilder<DB::MergeTreeIndexConditionBloomFilter::RPNElement>::extractRPN()
2022.10.18 20:52:11.739928 [ 211659 ] <Fatal> BaseDaemon: 18. ./build_clang/./src/Storages/MergeTree/MergeTreeIndexConditionBloomFilter.cpp:114: DB::MergeTreeIndexConditionBloomFilter::MergeTreeIndexConditionBloomFilter(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>, DB::Block const&, unsigned long) @ 0x15afceff in /usr/local/bin/clickhouse
2022.10.18 20:52:11.748262 [ 211659 ] <Fatal> BaseDaemon: 19.1. inlined from ./build_clang/./contrib/libcxx/include/__memory/shared_ptr.h:597: shared_ptr
2022.10.18 20:52:11.748297 [ 211659 ] <Fatal> BaseDaemon: 19.2. inlined from ./build_clang/./contrib/libcxx/include/__memory/construct_at.h:38: DB::MergeTreeIndexConditionBloomFilter* std::__1::construct_at<DB::MergeTreeIndexConditionBloomFilter, DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>&, DB::Block const&, unsigned long const&, DB::MergeTreeIndexConditionBloomFilter*>(DB::MergeTreeIndexConditionBloomFilter*, DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>&, DB::Block const&, unsigned long const&)
2022.10.18 20:52:11.748321 [ 211659 ] <Fatal> BaseDaemon: 19.3. inlined from ./build_clang/./contrib/libcxx/include/__memory/allocator_traits.h:298: void std::__1::allocator_traits<std::__1::allocator<DB::MergeTreeIndexConditionBloomFilter> >::construct<DB::MergeTreeIndexConditionBloomFilter, DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>&, DB::Block const&, unsigned long const&, void, void>(std::__1::allocator<DB::MergeTreeIndexConditionBloomFilter>&, DB::MergeTreeIndexConditionBloomFilter*, DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>&, DB::Block const&, unsigned long const&)
2022.10.18 20:52:11.748346 [ 211659 ] <Fatal> BaseDaemon: 19.4. inlined from ./build_clang/./contrib/libcxx/include/__memory/shared_ptr.h:293: __shared_ptr_emplace<const DB::SelectQueryInfo &, std::__1::shared_ptr<const DB::Context> &, const DB::Block &, const unsigned long &>
2022.10.18 20:52:11.748405 [ 211659 ] <Fatal> BaseDaemon: 19.5. inlined from ./build_clang/./contrib/libcxx/include/__memory/shared_ptr.h:954: std::__1::shared_ptr<DB::MergeTreeIndexConditionBloomFilter> std::__1::allocate_shared<DB::MergeTreeIndexConditionBloomFilter, std::__1::allocator<DB::MergeTreeIndexConditionBloomFilter>, DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>&, DB::Block const&, unsigned long const&, void>(std::__1::allocator<DB::MergeTreeIndexConditionBloomFilter> const&, DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>&, DB::Block const&, unsigned long const&)
2022.10.18 20:52:11.748438 [ 211659 ] <Fatal> BaseDaemon: 19.6. inlined from ./build_clang/./contrib/libcxx/include/__memory/shared_ptr.h:963: std::__1::shared_ptr<DB::MergeTreeIndexConditionBloomFilter> std::__1::make_shared<DB::MergeTreeIndexConditionBloomFilter, DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>&, DB::Block const&, unsigned long const&, void>(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>&, DB::Block const&, unsigned long const&)
2022.10.18 20:52:11.748468 [ 211659 ] <Fatal> BaseDaemon: 19. ./build_clang/./src/Storages/MergeTree/MergeTreeIndexBloomFilter.cpp:76: DB::MergeTreeIndexBloomFilter::createIndexCondition(DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>) const @ 0x15af59f6 in /usr/local/bin/clickhouse
2022.10.18 20:52:11.800615 [ 211659 ] <Fatal> BaseDaemon: 20. ./build_clang/./src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp:919: DB::MergeTreeDataSelectExecutor::filterPartsByPrimaryKeyAndSkipIndexes(std::__1::vector<std::__1::shared_ptr<DB::IMergeTreeDataPart const>, std::__1::allocator<std::__1::shared_ptr<DB::IMergeTreeDataPart const> > >&&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const>, DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const> const&, DB::KeyCondition const&, DB::MergeTreeReaderSettings const&, Poco::Logger*, unsigned long, std::__1::vector<DB::ReadFromMergeTree::IndexStat, std::__1::allocator<DB::ReadFromMergeTree::IndexStat> >&, bool) @ 0x15acc639 in /usr/local/bin/clickhouse
2022.10.18 20:52:11.848600 [ 211659 ] <Fatal> BaseDaemon: 21. ./build_clang/./src/Processors/QueryPlan/ReadFromMergeTree.cpp:971: DB::ReadFromMergeTree::selectRangesToRead(std::__1::vector<std::__1::shared_ptr<DB::IMergeTreeDataPart const>, std::__1::allocator<std::__1::shared_ptr<DB::IMergeTreeDataPart const> > >, std::__1::shared_ptr<DB::PrewhereInfo> const&, DB::ActionDAGNodes const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, DB::SelectQueryInfo const&, std::__1::shared_ptr<DB::Context const>, unsigned int, std::__1::shared_ptr<std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, long, 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, long> > > >, DB::MergeTreeData 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&, bool, Poco::Logger*) @ 0x160afe2e in /usr/local/bin/clickhouse
2022.10.18 20:52:11.894914 [ 211659 ] <Fatal> BaseDaemon: 22. ./build_clang/./src/Processors/QueryPlan/ReadFromMergeTree.cpp:0: DB::ReadFromMergeTree::selectRangesToRead(std::__1::vector<std::__1::shared_ptr<DB::IMergeTreeDataPart const>, std::__1::allocator<std::__1::shared_ptr<DB::IMergeTreeDataPart const> > >) const @ 0x160ae4dd in /usr/local/bin/clickhouse
2022.10.18 20:52:11.943999 [ 211659 ] <Fatal> BaseDaemon: 23. ./build_clang/./src/Processors/QueryPlan/ReadFromMergeTree.cpp:1057: DB::ReadFromMergeTree::getAnalysisResult() const @ 0x160b13fd in /usr/local/bin/clickhouse
2022.10.18 20:52:11.980569 [ 211659 ] <Fatal> BaseDaemon: 24. ./build_clang/./src/Processors/QueryPlan/ReadFromMergeTree.cpp:1067: DB::ReadFromMergeTree::initializePipeline(DB::QueryPipelineBuilder&, DB::BuildQueryPipelineSettings const&) @ 0x160b1573 in /usr/local/bin/clickhouse
2022.10.18 20:52:11.986004 [ 211659 ] <Fatal> BaseDaemon: 25. ./build_clang/./src/Processors/QueryPlan/ISourceStep.cpp:0: DB::ISourceStep::updatePipeline(std::__1::vector<std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder> >, std::__1::allocator<std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder> > > >, DB::BuildQueryPipelineSettings const&) @ 0x1608538f in /usr/local/bin/clickhouse
2022.10.18 20:52:11.996769 [ 211659 ] <Fatal> BaseDaemon: 26.1. inlined from ./build_clang/./contrib/libcxx/include/__memory/unique_ptr.h:312: std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder> >::reset(DB::QueryPipelineBuilder*)
2022.10.18 20:52:11.996797 [ 211659 ] <Fatal> BaseDaemon: 26.2. inlined from ./build_clang/./contrib/libcxx/include/__memory/unique_ptr.h:234: std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder> >::operator=(std::__1::unique_ptr<DB::QueryPipelineBuilder, std::__1::default_delete<DB::QueryPipelineBuilder> >&&)
2022.10.18 20:52:11.996816 [ 211659 ] <Fatal> BaseDaemon: 26. ./build_clang/./src/Processors/QueryPlan/QueryPlan.cpp:187: DB::QueryPlan::buildQueryPipeline(DB::QueryPlanOptimizationSettings const&, DB::BuildQueryPipelineSettings const&) @ 0x1609dbbe in /usr/local/bin/clickhouse
2022.10.18 20:52:12.020197 [ 211659 ] <Fatal> BaseDaemon: 27. ./build_clang/./src/Interpreters/InterpreterSelectWithUnionQuery.cpp:370: DB::InterpreterSelectWithUnionQuery::execute() @ 0x1503b794 in /usr/local/bin/clickhouse
2022.10.18 20:52:12.057265 [ 211659 ] <Fatal> BaseDaemon: 28. ./build_clang/./src/Interpreters/executeQuery.cpp:0: DB::executeQueryImpl(char const*, char const*, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x152a0fb6 in /usr/local/bin/clickhouse
2022.10.18 20:52:12.098152 [ 211659 ] <Fatal> BaseDaemon: 29. ./build_clang/./src/Interpreters/executeQuery.cpp:1228: DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum) @ 0x1529e5f0 in /usr/local/bin/clickhouse
2022.10.18 20:52:12.123254 [ 211659 ] <Fatal> BaseDaemon: 30. ./build_clang/./src/Server/TCPHandler.cpp:0: DB::TCPHandler::runImpl() @ 0x15d5e145 in /usr/local/bin/clickhouse
2022.10.18 20:52:12.163613 [ 211659 ] <Fatal> BaseDaemon: 31. ./build_clang/./src/Server/TCPHandler.cpp:1886: DB::TCPHandler::run() @ 0x15d6d419 in /usr/local/bin/clickhouse
2022.10.18 20:52:12.164614 [ 211659 ] <Fatal> BaseDaemon: 32. ./build_clang/./contrib/poco/Net/src/TCPServerConnection.cpp:57: Poco::Net::TCPServerConnection::start() @ 0x1813f907 in /usr/local/bin/clickhouse
2022.10.18 20:52:12.167159 [ 211659 ] <Fatal> BaseDaemon: 33.1. inlined from ./build_clang/./contrib/libcxx/include/__memory/unique_ptr.h:54: std::__1::default_delete<Poco::Net::TCPServerConnection>::operator()(Poco::Net::TCPServerConnection*) const
2022.10.18 20:52:12.167182 [ 211659 ] <Fatal> BaseDaemon: 33.2. inlined from ./build_clang/./contrib/libcxx/include/__memory/unique_ptr.h:315: std::__1::unique_ptr<Poco::Net::TCPServerConnection, std::__1::default_delete<Poco::Net::TCPServerConnection> >::reset(Poco::Net::TCPServerConnection*)
2022.10.18 20:52:12.167198 [ 211659 ] <Fatal> BaseDaemon: 33.3. inlined from ./build_clang/./contrib/libcxx/include/__memory/unique_ptr.h:269: ~unique_ptr
2022.10.18 20:52:12.167251 [ 211659 ] <Fatal> BaseDaemon: 33. ./build_clang/./contrib/poco/Net/src/TCPServerDispatcher.cpp:116: Poco::Net::TCPServerDispatcher::run() @ 0x1813fdef in /usr/local/bin/clickhouse
2022.10.18 20:52:12.169874 [ 211659 ] <Fatal> BaseDaemon: 34. ./build_clang/./contrib/poco/Foundation/src/ThreadPool.cpp:213: Poco::PooledThread::run() @ 0x182b2c07 in /usr/local/bin/clickhouse
2022.10.18 20:52:12.172413 [ 211659 ] <Fatal> BaseDaemon: 35.1. inlined from ./build_clang/./contrib/poco/Foundation/include/Poco/SharedPtr.h:156: Poco::SharedPtr<Poco::Runnable, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::Runnable> >::assign(Poco::Runnable*)
2022.10.18 20:52:12.172434 [ 211659 ] <Fatal> BaseDaemon: 35.2. inlined from ./build_clang/./contrib/poco/Foundation/include/Poco/SharedPtr.h:208: Poco::SharedPtr<Poco::Runnable, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::Runnable> >::operator=(Poco::Runnable*)
2022.10.18 20:52:12.172453 [ 211659 ] <Fatal> BaseDaemon: 35. ./build_clang/./contrib/poco/Foundation/src/Thread_POSIX.cpp:360: Poco::ThreadImpl::runnableEntry(void*) @ 0x182b07cf in /usr/local/bin/clickhouse
2022.10.18 20:52:12.172484 [ 211659 ] <Fatal> BaseDaemon: 36. ? @ 0x7f5162620609 in ?
2022.10.18 20:52:12.172527 [ 211659 ] <Fatal> BaseDaemon: 37. clone @ 0x7f5162545163 in ?
2022.10.18 20:52:12.290589 [ 211659 ] <Fatal> BaseDaemon: Integrity check of the executable skipped because the reference checksum could not be read. (calculated checksum: FD1CFF38D31CE1996A85E1D2122207F8)
Error on processing query: Code: 32. DB::Exception: Attempt to read after eof: while receiving packet from localhost:9000. (ATTEMPT_TO_READ_AFTER_EOF) (version 22.10.1.1)
```

{
    for (const auto & mapping : indexes_mapping)
        if (!mapping.functions.empty())
            return true;
    return false;
}
void FieldValue::update(const Field & x)
{
    if (x.isNegativeInfinity() || x.isPositiveInfinity())
        value = x;
    else
    {
        
        if (!column->empty())
            column->popBack(1);
        column->insert(x);
        value = Field(); 
    }
}
}