

such as
```
create view view1 as 
with t as (select number n from numbers(3))
select n from t
```
if (from_path)
    {
        if (data_path.empty())
            throw Exception(ErrorCodes::NOT_IMPLEMENTED,
                            "ATTACH ... FROM ... query is not supported for {} database engine", database->getEngineName());
        
        data_path = *create.attach_from_path;
        create.attach_from_path = std::nullopt;
    }
    StoragePtr res;
    
    if (create.as_table_function)
    {
        const auto & factory = TableFunctionFactory::instance();
        auto table_func = factory.get(create.as_table_function, getContext());
        res = table_func->execute(create.as_table_function, getContext(), create.table, properties.columns);
        res->renameInMemory({create.database, create.table, create.uuid});
    }
    else
    {
        res = StorageFactory::instance().get(create,
            data_path,
            getContext(),
            getContext()->getGlobalContext(),
            properties.columns,
            properties.constraints,
            false);
    }
    if (from_path && !res->storesDataOnDisk())
        throw Exception(ErrorCodes::NOT_IMPLEMENTED,