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

throwFromErrno("Cannot stat table file descriptor, inside " + storage_name, ErrorCodes::CANNOT_STAT);
        if (S_ISREG(file_stat.st_mode))
            nested_buffer = std::make_unique<ReadBufferFromFileDescriptorPRead>(table_fd);
        else
            nested_buffer = std::make_unique<ReadBufferFromFileDescriptor>(table_fd);
        method = chooseCompressionMethod("", compression_method);
    }
    else
    {
        
        if (0 != stat(current_path.c_str(), &file_stat))
            throwFromErrno("Cannot stat file " + current_path, ErrorCodes::CANNOT_STAT);
        if (S_ISREG(file_stat.st_mode))
            nested_buffer = std::make_unique<ReadBufferFromFilePRead>(current_path, context->getSettingsRef().max_read_buffer_size);
        else
            nested_buffer = std::make_unique<ReadBufferFromFile>(current_path, context->getSettingsRef().max_read_buffer_size);
        method = chooseCompressionMethod(current_path, compression_method);
    }
    
    if (context->getApplicationType() == Context::ApplicationType::LOCAL
        || context->getApplicationType() == Context::ApplicationType::CLIENT)
    {
        auto & in = static_cast<ReadBufferFromFileDescriptor &>(*nested_buffer);
        in.setProgressCallback(context);
    }
    auto zstd_window_log_max = context->getSettingsRef().zstd_window_log_max;
    return wrapReadBufferWithCompressionMethod(std::move(nested_buffer), method, zstd_window_log_max);
}
}
Strings StorageFile::getPathsList(const String & table_path, const String & user_files_path, ContextPtr context, size_t & total_bytes_to_read)