Skip to content

Commit

Permalink
Store and parse version as a uint32 (#3341)
Browse files Browse the repository at this point in the history
  • Loading branch information
bekadavis9 committed Jul 6, 2022
1 parent 090379f commit 12fde68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tiledb/sm/filter/compression_filter.h
Expand Up @@ -148,7 +148,7 @@ class CompressionFilter : public Filter {
int level_;

/** The format version. */
int version_;
uint32_t version_;

/** The default filter compression level. */
static constexpr int default_level_ = -30000;
Expand Down
3 changes: 2 additions & 1 deletion tiledb/storage_format/uri/parse_uri.cc
Expand Up @@ -87,7 +87,8 @@ Status get_fragment_name_version(const std::string& name, uint32_t* version) {
// version is greater than or equal to 10, we have a footer version of 5.
// version is greater than or equal to 7, we have a footer version of 4.
// Otherwise, it is version 3.
const int frag_version = std::stoi(name.substr(name.find_last_of('_') + 1));
const uint32_t frag_version =
std::stol(name.substr(name.find_last_of('_') + 1));
if (frag_version >= 10)
*version = 5;
else if (frag_version >= 7)
Expand Down

0 comments on commit 12fde68

Please sign in to comment.