```
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

{
    const Settings & settings = context->getSettingsRef();
    Int64 lock_timeout = settings.lock_acquire_timeout.totalSeconds();
    if (settings.max_execution_time.totalSeconds() != 0 && settings.max_execution_time.totalSeconds() < lock_timeout)
        lock_timeout = settings.max_execution_time.totalSeconds();
    return std::chrono::seconds{lock_timeout};
}
using StorageFilePtr = std::shared_ptr<StorageFile>;
class StorageFileSource : public ISource
{
public:
    struct FilesInfo
    {
        std::vector<std::string> files;
        std::atomic<size_t> next_file_to_read = 0;
        bool need_path_column = false;
        bool need_file_column = false;
        size_t total_bytes_to_read = 0;
    };
    using FilesInfoPtr = std::shared_ptr<FilesInfo>;
    static Block getHeader(const StorageMetadataPtr & metadata_snapshot, bool need_path_column, bool need_file_column)