Skip to content

Commit

Permalink
Read cache metadata correctly (#494)
Browse files Browse the repository at this point in the history
Currently we will not be able to read cache metadata for files that are
bigger than 4GB because we use stoi function. Use stoll instead that
will read long long values. Timestamp also needs to be read with stoll.
  • Loading branch information
mkaruza authored Dec 16, 2024
1 parent efaa2b0 commit 44b292a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pgduckdb_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ DuckdbGetCachedFilesInfos() {
p.path().c_str());
break;
}
cache_info.push_back(CacheFileInfo {metadata_tokens[0], metadata_tokens[1], std::stoi(metadata_tokens[2]),
std::stoi(metadata_tokens[3])});
cache_info.push_back(CacheFileInfo {metadata_tokens[0], metadata_tokens[1], std::stoll(metadata_tokens[2]),
std::stoll(metadata_tokens[3])});
}
}
return cache_info;
Expand Down

0 comments on commit 44b292a

Please sign in to comment.