**Describe the bug**

The query:
```
SELECT
    (current_database = currentDatabase()) AND (type = 0),
    ((current_database = currentDatabase()) AND (type = NULL)) AND (type = NULL) AND ((current_database = currentDatabase()) AND (type = 1048575)) AND (type = NULL) AND (event_date >= yesterday())
FROM system.query_log
ARRAY JOIN ProfileEvents
WHERE ProfileEvents AND (current_database = currentDatabase())
ORDER BY event_time DESC NULLS FIRST
LIMIT 0
```
crashes the server.

Most likely introduced here: #16618
"Expected a column in PARTITION BY in window definition,"
                    " got '{}'",
                    column_ast->formatForErrorMessage());
            }
            desc.partition_by.push_back(SortColumnDescription(
                    with_alias->getColumnName(), 1 ,
                    1 ));
        }
    }
    if (definition.order_by)
    {
        for (const auto & column_ast
            : definition.order_by->children)
        {
            
            const auto & order_by_element
                = column_ast->as<ASTOrderByElement &>();
            
            desc.order_by.push_back(
                SortColumnDescription(
                    order_by_element.children.front()->getColumnName(),
                    order_by_element.direction,
                    order_by_element.nulls_direction));
        }
    }
    desc.full_sort_description = desc.partition_by;
    desc.full_sort_description.insert(desc.full_sort_description.end(),
        desc.order_by.begin(), desc.order_by.end());
}
void ExpressionAnalyzer::makeWindowDescriptions(ActionsDAGPtr actions)