```
CREATE TABLE a
(
    `number` UInt64,
    `x` MATERIALIZED x
)
ENGINE = MergeTree
ORDER BY number;
-- that should fail!

insert into a values (1);
Received exception from server (version 21.7.1):
Code: 47. DB::Exception: Received from localhost:9000. DB::Exception: Missing columns: 'x' while processing query: 'CAST(x, 'UInt8') AS x', required columns: 'x' 'x'. 
```
{
    
    struct ExtractedSettings
    {
        const UInt64 max_ast_depth;
        const UInt64 max_expanded_ast_elements;
        bool prefer_column_name_to_alias;
        template <typename T>
        ExtractedSettings(const T & settings)
            : max_ast_depth(settings.max_ast_depth)
            , max_expanded_ast_elements(settings.max_expanded_ast_elements)
            , prefer_column_name_to_alias(settings.prefer_column_name_to_alias)
        {
        }
    };
public:
    struct Data
    {
        using SetOfASTs = std::set<const IAST *>;
        using MapOfASTs = std::map<ASTPtr, ASTPtr>;
        const Aliases & aliases;
        const NameSet & source_columns_set;
        ExtractedSettings settings;
        
        size_t level;
        MapOfASTs finished_asts;    
        SetOfASTs current_asts;     
        std::string current_alias;  
        bool ignore_alias; 
        Data(const Aliases & aliases_, const NameSet & source_columns_set_, bool ignore_alias_, ExtractedSettings && settings_)