| 81 | /* ****************************** */ |
| 82 | |
| 83 | ArraySchema::ArraySchema( |
| 84 | ArrayType array_type, |
| 85 | shared_ptr<MemoryTracker> memory_tracker, |
| 86 | const std::optional<std::pair<uint64_t, uint64_t>>& timestamp_range) |
| 87 | : memory_tracker_(memory_tracker) |
| 88 | , uri_(URI()) |
| 89 | , array_uri_(URI()) |
| 90 | , version_(constants::format_version) |
| 91 | , name_("") |
| 92 | , array_type_(array_type) |
| 93 | , allows_dups_(false) |
| 94 | , domain_(nullptr) |
| 95 | , dim_map_(memory_tracker_->get_resource(MemoryType::DIMENSIONS)) |
| 96 | , cell_order_(Layout::ROW_MAJOR) |
| 97 | , tile_order_(Layout::ROW_MAJOR) |
| 98 | , capacity_(constants::capacity) |
| 99 | , attributes_(memory_tracker_->get_resource(MemoryType::ATTRIBUTES)) |
| 100 | , attribute_map_(memory_tracker_->get_resource(MemoryType::ATTRIBUTES)) |
| 101 | , dimension_labels_( |
| 102 | memory_tracker_->get_resource(MemoryType::DIMENSION_LABELS)) |
| 103 | , dimension_label_map_( |
| 104 | memory_tracker_->get_resource(MemoryType::DIMENSION_LABELS)) |
| 105 | , enumeration_map_(memory_tracker_->get_resource(MemoryType::ENUMERATION)) |
| 106 | , enumeration_path_map_( |
| 107 | memory_tracker_->get_resource(MemoryType::ENUMERATION_PATHS)) |
| 108 | , current_domain_(make_shared<CurrentDomain>( |
| 109 | memory_tracker, constants::current_domain_version)) { |
| 110 | // Set timestamp to the user passed-in range, otherwise set to the current |
| 111 | // time |
| 112 | uint64_t now = utils::time::timestamp_now_ms(); |
| 113 | timestamp_range_ = timestamp_range.value_or(std::make_pair(now, now)); |
| 114 | |
| 115 | // Set up default filter pipelines for coords, offsets, and validity values. |
| 116 | coords_filters_.add_filter(CompressionFilter( |
| 117 | constants::coords_compression, |
| 118 | constants::coords_compression_level, |
| 119 | Datatype::ANY)); |
| 120 | cell_var_offsets_filters_.add_filter(CompressionFilter( |
| 121 | constants::cell_var_offsets_compression, |
| 122 | constants::cell_var_offsets_compression_level, |
| 123 | Datatype::UINT64)); |
| 124 | cell_validity_filters_.add_filter(CompressionFilter( |
| 125 | constants::cell_validity_compression, |
| 126 | constants::cell_validity_compression_level, |
| 127 | Datatype::UINT8)); |
| 128 | |
| 129 | // Generate URI and name for ArraySchema |
| 130 | generate_uri(timestamp_range); |
| 131 | } |
| 132 | |
| 133 | ArraySchema::ArraySchema( |
| 134 | URI uri, |
nothing calls this directly
no test coverage detected