Skip to content

Commit

Permalink
Use the term "enumeration filename" in code.
Browse files Browse the repository at this point in the history
  • Loading branch information
teo-tsirpanis committed Jul 19, 2024
1 parent 4e004b6 commit 78ac1d2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions tiledb/sm/array_schema/array_schema.cc
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ ArraySchema::ArraySchema(
dim_map_[dim->name()] = dim;
}

for (auto& [enmr_name, enmr_uri] : enumeration_path_map_) {
(void)enmr_uri;
for (auto& [enmr_name, enmr_filename] : enumeration_path_map_) {
(void)enmr_filename;
enumeration_map_[enmr_name] = nullptr;
}

Expand Down Expand Up @@ -822,14 +822,14 @@ void ArraySchema::serialize(Serializer& serializer) const {
utils::safe_integral_cast<size_t, uint32_t>(enumeration_map_.size());

serializer.write<uint32_t>(enmr_num);
for (auto& [enmr_name, enmr_uri] : enumeration_path_map_) {
for (auto& [enmr_name, enmr_filename] : enumeration_path_map_) {
auto enmr_name_size = static_cast<uint32_t>(enmr_name.size());
serializer.write<uint32_t>(enmr_name_size);
serializer.write(enmr_name.data(), enmr_name_size);

auto enmr_uri_size = static_cast<uint32_t>(enmr_uri.size());
serializer.write<uint32_t>(enmr_uri_size);
serializer.write(enmr_uri.data(), enmr_uri_size);
auto enmr_filename_size = static_cast<uint32_t>(enmr_filename.size());
serializer.write<uint32_t>(enmr_filename_size);
serializer.write(enmr_filename.data(), enmr_filename_size);
}

// Serialize array current domain information
Expand Down Expand Up @@ -1377,11 +1377,11 @@ shared_ptr<ArraySchema> ArraySchema::deserialize(
std::string enmr_name(
deserializer.get_ptr<char>(enmr_name_size), enmr_name_size);

auto enmr_path_size = deserializer.read<uint32_t>();
std::string enmr_path_name(
deserializer.get_ptr<char>(enmr_path_size), enmr_path_size);
auto enmr_filename_size = deserializer.read<uint32_t>();
std::string enmr_filename(
deserializer.get_ptr<char>(enmr_filename_size), enmr_filename_size);

enumeration_path_map[enmr_name] = enmr_path_name;
enumeration_path_map[enmr_name] = enmr_filename;
}
}

Expand Down
2 changes: 1 addition & 1 deletion tiledb/sm/array_schema/array_schema.h
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ class ArraySchema {
tdb::pmr::unordered_map<std::string, shared_ptr<const Enumeration>>
enumeration_map_;

/** A map of Enumeration names to Enumeration URIs */
/** A map of Enumeration names to Enumeration filenames */
tdb::pmr::unordered_map<std::string, std::string> enumeration_path_map_;

/** The filter pipeline run on offset tiles for var-length attributes. */
Expand Down

0 comments on commit 78ac1d2

Please sign in to comment.