time_virtual_col: st_mtime, not st_mtim, because of darwin

This commit is contained in:
Ilya Golshtein 2024-06-07 12:14:21 +00:00
parent b82ab5a402
commit f77b6096c4

View File

@ -1371,7 +1371,7 @@ Chunk StorageFileSource::generate()
struct stat file_stat; struct stat file_stat;
file_stat = getFileStat(current_path, storage->use_table_fd, storage->table_fd, storage->getName()); file_stat = getFileStat(current_path, storage->use_table_fd, storage->table_fd, storage->getName());
current_file_size = file_stat.st_size; current_file_size = file_stat.st_size;
current_file_last_modified = Poco::Timestamp::fromEpochTime(file_stat.st_mtim.tv_sec); current_file_last_modified = Poco::Timestamp::fromEpochTime(file_stat.st_mtime);
if (getContext()->getSettingsRef().engine_file_skip_empty_files && file_stat.st_size == 0) if (getContext()->getSettingsRef().engine_file_skip_empty_files && file_stat.st_size == 0)
continue; continue;