```
SELECT
    _file,
    _path
FROM file('exists.csv', 'CSVWithNames')

Query id: 8bff0d32-cad0-4832-907a-be39f13ac49c


0 rows in set. Elapsed: 0.099 sec.

Received exception from server (version 22.7.1):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Invalid number of columns in chunk pushed to OutputPort. Expected 2, found 4
Header: _path LowCardinality(String) ColumnLowCardinality(size = 0, UInt8(size = 0), ColumnUnique(size = 1, String(size = 1))), _file LowCardinality(String) ColumnLowCardinality(size = 0, UInt8(size = 0), ColumnUnique(size = 1, String(size = 1)))
Chunk:  ColumnLowCardinality(size = 7385, UInt8(size = 7385), ColumnUnique(size = 1, String(size = 1))) ColumnLowCardinality(size = 7385, UInt8(size = 7385), ColumnUnique(size = 1, String(size = 1))) ColumnLowCardinality(size = 7385, UInt8(size = 7385), ColumnUnique(size = 2, String(size = 2))) ColumnLowCardinality(size = 7385, UInt8(size = 7385), ColumnUnique(size = 2, String(size = 2)))
. (LOGICAL_ERROR)
```

Version 22.7.1.2484

if (num_streams > paths.size())
        num_streams = paths.size();
    Pipes pipes;
    pipes.reserve(num_streams);
    
    auto progress_callback = context->getFileProgressCallback();
    if (progress_callback)
        progress_callback(FileProgress(0, total_bytes_to_read));
    for (size_t i = 0; i < num_streams; ++i)
    {
        const auto get_columns_for_format = [&]() -> ColumnsDescription
        {
            if (supportsSubsetOfColumns())
                return storage_snapshot->getDescriptionForColumns(column_names);
            else
                return storage_snapshot->metadata->getColumns();
        };
        
        
        
        
        std::unique_ptr<ReadBuffer> read_buffer;
        if (has_peekable_read_buffer_from_fd.exchange(false))
            read_buffer = std::move(peekable_read_buffer_from_fd);
        pipes.emplace_back(std::make_shared<StorageFileSource>(
            this_ptr, storage_snapshot, context, max_block_size, files_info, get_columns_for_format(), std::move(read_buffer)));
    }
    return Pipe::unitePipes(std::move(pipes));
}
class StorageFileSink final : public SinkToStorage