Reproducer: 
``` sql
SELECT count() FROM (SELECT queryID() AS t FROM remote('127.0.0.{1..3}', numbers(10)) WITH TOTALS HAVING t = initialQueryID())

Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Chunk info was not set for chunk in GroupingAggregatedTransform.. (LOGICAL_ERROR)
``` 
{
                                select_query->group_by_with_constant_keys = true;
                                
                                if (!aggregate_descriptions.empty() || group_size > 1)
                                {
                                    if (j + 1 < static_cast<ssize_t>(group_size))
                                        group_elements_ast[j] = std::move(group_elements_ast.back());
                                    group_elements_ast.pop_back();
                                    --j;
                                    continue;
                                }
                            }
                        }
                        NameAndTypePair key{column_name, use_nulls ? makeNullableSafe(node->result_type) : node->result_type };
                        grouping_set_list.push_back(key);
                        
                        if (!unique_keys.contains(key.name))
                        {
                            unique_keys[key.name] = aggregation_keys.size();
                            grouping_set_indexes_list.push_back(aggregation_keys.size());
                            aggregation_keys.push_back(key);
                            
                            aggregated_columns.push_back(std::move(key));
                        }
                        else
                        {
                            grouping_set_indexes_list.push_back(unique_keys[key.name]);
                        }
                    }
                    aggregation_keys_list.push_back(std::move(grouping_set_list));