Hi @vitlibar,
In http implementation, ClickHouse will return format of query result in header `X-ClickHouse-Format`. Can we return format in gRPC response as well? This helps client like JDBC driver for deserialization(without the need for parsing the query).
{
        auto values = progress.fetchAndResetPiecewiseAtomically();
        if (!values.read_rows && !values.read_bytes && !values.total_rows_to_read && !values.written_rows && !values.written_bytes)
            return;
        auto & grpc_progress = *result.mutable_progress();
        
        grpc_progress.set_read_rows(grpc_progress.read_rows() + values.read_rows);
        grpc_progress.set_read_bytes(grpc_progress.read_bytes() + values.read_bytes);
        grpc_progress.set_total_rows_to_read(grpc_progress.total_rows_to_read() + values.total_rows_to_read);
        grpc_progress.set_written_rows(grpc_progress.written_rows() + values.written_rows);
        grpc_progress.set_written_bytes(grpc_progress.written_bytes() + values.written_bytes);
    }
    void Call::addTotalsToResult(const Block & totals)
    {
        if (!totals)
            return;
        PODArray<char> memory;
        if (output_compression_method != CompressionMethod::None)
            memory.resize(DBMS_DEFAULT_BUFFER_SIZE); 
        std::unique_ptr<WriteBuffer> buf = std::make_unique<WriteBufferFromVector<PODArray<char>>>(memory);
        buf = wrapWriteBufferWithCompressionMethod(std::move(buf), output_compression_method, output_compression_level);
        auto format = query_context->getOutputFormat(output_format, *buf, totals);
        format->write(materializeBlock(totals));
        format->finalize();
        buf->finalize();
        result.mutable_totals()->assign(memory.data(), memory.size());
    }
    void Call::addExtremesToResult(const Block & extremes)