I get an exception when I query a column that tries to calculate its default from a column that does not exist either.
Here is a reproducible example:
```
create table test (col Int8) engine=MergeTree order by tuple();

insert into test values (1);

alter table test add column s1 String;
alter table test add column s2 String default s1;

-- requesting both columns
select * from test;

col | s1 | s2
----+----+---
  1 |    |   

-- requesting only one column
select s2 from test;

DB::Exception: Missing columns: 's1' while processing query: 'CAST(s1, 'String') AS s2', 
required columns: 's1' 's1': (while reading from part /var/lib/clickhouse/data/dw/test/all_1_1_0/): 
While executing MergeTree (version 21.7.3.14 (official build))
```

The same thing happens with a merge.
I set up 30 day TTL for two arrays, 'names' and 'values'.
MATERIALIZE TTL cleaned the data.
When a merge for an old partition (20210418) got scheduled it could not proceed, because one of the recently added columns (`v3h_fixed`) had its default value pointing to the 'names' and 'values' columns: `CAST(values[indexOf(names, '3hFixed')], 'String')`

Here is the exception:
Code: 47, e.displayText() = DB::Exception: Missing columns: 'names' 'values' while processing query: 'CAST(values[indexOf(names, '3hFixed')], 'String') AS v3h_fixed', required columns: 'values' 'names' 'values' 'names': (while reading from part /var/lib/clickhouse/data/db/table/20210418_238_238_0_248/): While executing MergeTreeSequentialSource: Cannot fetch required block. Stream PipelineExecuting, part 2 (version 21.7.3.14 (official build))

The merge was able to proceed and completed successfully after I removed the default expression from the `v3h_fixed` column.

I could not reproduce this on a test table.
Weird.

```
[ 7095 ] {} <Error> db.table: auto DB::StorageReplicatedMergeTree::processQueueEntry(ReplicatedMergeTreeQueue::SelectedEntryPtr)::(anonymous class)::operator() 
(DB::StorageReplicatedMergeTree::LogEntryPtr &) const: Code: 47, e.displayText() = DB::Exception: 
Missing columns: 'names' 'values' while processing query: 'CAST(values[indexOf(names, '3hFixed')], 'String') AS v3h_fixed', 
required columns: 'values' 'names' 'values' 'names': (while reading from part /var/lib/clickhouse/data/db/table/20210418_238_238_0_248/): 
While executing MergeTreeSequentialSource: Cannot fetch required block. Stream PipelineExecuting, part 2, 
Stack trace (when copying this message, always include the lines below):

0. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >
 const&, int, bool) @ 0x8d31b5a in /usr/bin/clickhouse
1. DB::TreeRewriterResult::collectUsedColumns(std::__1::shared_ptr<DB::IAST> const&, bool) @ 0xfdb2470 in /usr/bi
n/clickhouse
2. DB::TreeRewriter::analyze(std::__1::shared_ptr<DB::IAST>&, DB::NamesAndTypesList const&, std::__1::shared_ptr<
DB::IStorage const>, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool, bool) const @ 0xfdbb40
c in /usr/bin/clickhouse
3. ? @ 0xfe370e9 in /usr/bin/clickhouse
4. DB::evaluateMissingDefaults(DB::Block const&, DB::NamesAndTypesList const&, DB::ColumnsDescription const&, std
::__1::shared_ptr<DB::Context const>, bool, bool) @ 0xfe379c9 in /usr/bin/clickhouse
5. DB::IMergeTreeReader::evaluateMissingDefaults(DB::Block, std::__1::vector<COW<DB::IColumn>::immutable_ptr<DB::
IColumn>, std::__1::allocator<COW<DB::IColumn>::immutable_ptr<DB::IColumn> > >&) @ 0x104bf3ed in /usr/bin/clickho
use
6. DB::MergeTreeSequentialSource::generate() @ 0x104d098b in /usr/bin/clickhouse
7. DB::ISource::tryGenerate() @ 0x106dfe35 in /usr/bin/clickhouse
8. DB::ISource::work() @ 0x106dfa1a in /usr/bin/clickhouse
9. DB::SourceWithProgress::work() @ 0x108b098a in /usr/bin/clickhouse
10. ? @ 0x1071a4dd in /usr/bin/clickhouse
11. DB::PipelineExecutor::executeStepImpl(unsigned long, unsigned long, std::__1::atomic<bool>*) @ 0x10717071 in
/usr/bin/clickhouse
12. DB::PipelineExecutor::executeStep(std::__1::atomic<bool>*) @ 0x10715a9c in /usr/bin/clickhouse
13. DB::PullingPipelineExecutor::pull(DB::Chunk&) @ 0x1072308a in /usr/bin/clickhouse
14. DB::PullingPipelineExecutor::pull(DB::Block&) @ 0x10723290 in /usr/bin/clickhouse
15. DB::PipelineExecutingBlockInputStream::readImpl() @ 0x10711f14 in /usr/bin/clickhouse
16. DB::IBlockInputStream::read() @ 0xf51c6a4 in /usr/bin/clickhouse
17. DB::ColumnGathererStream::fetchNewBlock(DB::ColumnGathererStream::Source&, unsigned long) @ 0xfe72412 in /usr
/bin/clickhouse
18. void DB::ColumnGathererStream::gather<DB::ColumnString>(DB::ColumnString&) @ 0xff06ef1 in /usr/bin/clickhouse
19. DB::ColumnGathererStream::readImpl() @ 0xfe72244 in /usr/bin/clickhouse
20. DB::IBlockInputStream::read() @ 0xf51c6a4 in /usr/bin/clickhouse
21. DB::MergeTreeDataMergerMutator::mergePartsToTemporaryPart(DB::FutureMergedMutatedPart const&, std::__1::share
d_ptr<DB::StorageInMemoryMetadata const> const&, DB::BackgroundProcessListEntry<DB::MergeListElement, DB::MergeIn
fo>&, std::__1::shared_ptr<DB::RWLockImpl::LockHolderImpl>&, long, std::__1::shared_ptr<DB::Context const>, std::
__1::unique_ptr<DB::IReservation, std::__1::default_delete<DB::IReservation> > const&, bool, 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::MergeTreeData::Mergi
ngParams const&, DB::IMergeTreeDataPart const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__
1::allocator<char> > const&) @ 0x103eeb62 in /usr/bin/clickhouse
22. DB::StorageReplicatedMergeTree::tryExecuteMerge(DB::ReplicatedMergeTreeLogEntry const&) @ 0x10123346 in /usr/
bin/clickhouse
23. DB::StorageReplicatedMergeTree::executeLogEntry(DB::ReplicatedMergeTreeLogEntry&) @ 0x10115054 in /usr/bin/cl
ickhouse
24. ? @ 0x101c9c3f in /usr/bin/clickhouse
25. DB::ReplicatedMergeTreeQueue::processEntry(std::__1::function<std::__1::shared_ptr<zkutil::ZooKeeper> ()>, st
d::__1::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&, std::__1::function<bool (std::__1::shared_ptr<DB::Replicate
dMergeTreeLogEntry>&)>) @ 0x1055e38c in /usr/bin/clickhouse
26. DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::Selected
Entry>) @ 0x1015e49d in /usr/bin/clickhouse
27. ? @ 0x103130b7 in /usr/bin/clickhouse
28. ThreadPoolImpl<ThreadFromGlobalPool>::worker(std::__1::__list_iterator<ThreadFromGlobalPool, void*>) @ 0x8d75
738 in /usr/bin/clickhouse
29. ThreadFromGlobalPool::ThreadFromGlobalPool<void ThreadPoolImpl<ThreadFromGlobalPool>::scheduleImpl<void>(std:
:__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'()>(void&&, void ThreadPoolImpl<Thread
FromGlobalPool>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda
0'()&&...)::'lambda'()::operator()() @ 0x8d772df in /usr/bin/clickhouse
30. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x8d72a1f in /
usr/bin/clickhouse
31. ? @ 0x8d76303 in /usr/bin/clickhouse
 (version 21.7.3.14 (official build))
```
{
    ASTPtr conversion_expr_list = convertRequiredExpressions(block, required_columns);
    if (conversion_expr_list->children.empty())
        return;
    if (auto dag = createExpressions(block, conversion_expr_list, true, required_columns, context))
    {
        auto expression = std::make_shared<ExpressionActions>(std::move(dag), ExpressionActionsSettings::fromContext(context));
        expression->execute(block);
    }
}
ActionsDAGPtr evaluateMissingDefaults(
    const Block & header,
    const NamesAndTypesList & required_columns,
    const ColumnsDescription & columns,
    ContextPtr context,
    bool save_unneeded_columns,
    bool null_as_default)
{
    if (!columns.hasDefaults())
        return nullptr;
    ASTPtr expr_list = defaultRequiredExpressions(header, required_columns, columns, null_as_default);
    return createExpressions(header, expr_list, save_unneeded_columns, required_columns, context);
}
}