```sql
SELECT groupArray(tuple(value)) OVER ()
FROM (select number value from numbers(10))
ORDER BY value ASC;

Received exception from server (version 22.7.1):
Code: 10. DB::Exception: Received from localhost:9000. 
DB::Exception: Not found column value in block. 
There are only columns: groupArray(tuple(value)) OVER (), tuple(value). (NOT_FOUND_COLUMN_IN_BLOCK)
```

without tuple is OK
```sql
SELECT groupArray(value) OVER ()
FROM (select number value from numbers(10))
ORDER BY value ASC;
┌─groupArray(value) OVER ()─┐
│ [0,1,2,3,4,5,6,7,8,9]     │
│ [0,1,2,3,4,5,6,7,8,9]     │
│ [0,1,2,3,4,5,6,7,8,9]     │
│ [0,1,2,3,4,5,6,7,8,9]     │
│ [0,1,2,3,4,5,6,7,8,9]     │
│ [0,1,2,3,4,5,6,7,8,9]     │
│ [0,1,2,3,4,5,6,7,8,9]     │
│ [0,1,2,3,4,5,6,7,8,9]     │
│ [0,1,2,3,4,5,6,7,8,9]     │
│ [0,1,2,3,4,5,6,7,8,9]     │
└───────────────────────────┘
```

```sql
SELECT value, groupArray(tuple(value)) OVER ()
FROM (select number value from numbers(10))
ORDER BY value ASC;
┌─value─┬─groupArray(tuple(value)) OVER ()──────────┐
│     0 │ [(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)] │
│     1 │ [(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)] │
│     2 │ [(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)] │
│     3 │ [(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)] │
│     4 │ [(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)] │
│     5 │ [(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)] │
│     6 │ [(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)] │
│     7 │ [(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)] │
│     8 │ [(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)] │
│     9 │ [(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)] │
└───────┴───────────────────────────────────────────┘
```
{
    const auto * select_query = getSelectQuery();
    if (!select_query->where())
        return false;
    ExpressionActionsChain::Step & step = chain.lastStep(columns_after_join);
    getRootActions(select_query->where(), only_types, step.actions());
    auto where_column_name = select_query->where()->getColumnName();
    step.addRequiredOutput(where_column_name);
    const auto & node = step.actions()->findInOutputs(where_column_name);
    auto filter_type = node.result_type;
    if (!filter_type->canBeUsedInBooleanContext())
        throw Exception("Invalid type for filter in WHERE: " + filter_type->getName(),
                        ErrorCodes::ILLEGAL_TYPE_OF_COLUMN_FOR_FILTER);
    return true;
}
bool SelectQueryExpressionAnalyzer::appendGroupBy(ExpressionActionsChain & chain, bool only_types, bool optimize_aggregation_in_order,
                                                  ManyExpressionActions & group_by_elements_actions)
{
    const auto * select_query = getAggregatingQuery();
    if (!select_query->groupBy())
        return false;
    ExpressionActionsChain::Step & step = chain.lastStep(columns_after_join);
    ASTs asts = select_query->groupBy()->children;
    if (select_query->group_by_with_grouping_sets)
    {