Skip to content

Commit

Permalink
Merge branch 'dev' into s3-no-md5
Browse files Browse the repository at this point in the history
  • Loading branch information
KiterLuc authored Aug 15, 2024
2 parents 9479a81 + 2edb451 commit 9623cc7
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ jobs:
uses: seanmiddleditch/gha-setup-ninja@v4
- name: Prevent vcpkg from building debug variants
run: python $env:GITHUB_WORKSPACE/scripts/ci/patch_vcpkg_triplets.py
- name: Install dependencies from pip
run: python -m pip install pybind11[global]

- name: Configure TileDB
shell: pwsh
Expand Down
6 changes: 3 additions & 3 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ if (${TILEDB_ARROW_TESTS})
if (NOT ${pybind11_FOUND})
# Get the include arguments from the python executable (has "-I" compiler option)
execute_process(COMMAND ${Python_EXECUTABLE} -m pybind11 --includes
OUTPUT_VARIABLE CMD_PYBIND11_INCLUDE
RESULT_VARIABLE CMD_PYBIND11_RESULT
OUTPUT_STRIP_TRAILING_WHITESPACE)
OUTPUT_VARIABLE CMD_PYBIND11_INCLUDE
RESULT_VARIABLE CMD_PYBIND11_RESULT
OUTPUT_STRIP_TRAILING_WHITESPACE)
if (${CMD_PYBIND11_RESULT})
message(FATAL_ERROR "Unable to find pybind11 via cmake or 'python3 -m pybind11 --includes'")
endif()
Expand Down
17 changes: 7 additions & 10 deletions tiledb/sm/fragment/fragment_metadata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1938,22 +1938,19 @@ void FragmentMetadata::expand_non_empty_domain(const NDRange& mbr) {

// ===== FORMAT =====
// bounding_coords_num (uint64_t)
// bounding_coords_#1 (void*) bounding_coords_#2 (void*) ...
// bounding_coords_#1 (dim_type[2][n_dims])
// bounding_coords_#2 (dim_type[2][n_dims])
// ...
// Note: This version supports only dimensions domains with the same type
void FragmentMetadata::load_bounding_coords(Deserializer& deserializer) {
// Get number of bounding coordinates
uint64_t bounding_coords_num = 0;
bounding_coords_num = deserializer.read<uint64_t>();
uint64_t bounding_coords_num = deserializer.read<uint64_t>();

// Get bounding coordinates
// Note: This version supports only dimensions domains with the same type
auto coord_size{array_schema_->domain().dimension_ptr(0)->coord_size()};
auto dim_num = array_schema_->domain().dim_num();
uint64_t bounding_coords_size = 2 * dim_num * coord_size;
bounding_coords_.resize(bounding_coords_num);
for (uint64_t i = 0; i < bounding_coords_num; ++i) {
bounding_coords_[i].resize(bounding_coords_size);
deserializer.read(&bounding_coords_[i][0], bounding_coords_size);
}
// Skip bounding coordinates. They are not actually being used.
deserializer.skip(bounding_coords_num * bounding_coords_size);
}

void FragmentMetadata::load_file_sizes(Deserializer& deserializer) {
Expand Down
3 changes: 0 additions & 3 deletions tiledb/sm/fragment/fragment_metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -853,9 +853,6 @@ class FragmentMetadata {
*/
std::unordered_map<std::string, unsigned> idx_map_;

/** A vector storing the first and last coordinates of each tile. */
std::vector<std::vector<uint8_t>> bounding_coords_;

/** True if the fragment is dense, and false if it is sparse. */
bool dense_;

Expand Down
15 changes: 15 additions & 0 deletions tiledb/storage_format/serialization/serializers.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,21 @@ class Deserializer {
size_ -= size;
}

/**
* Advances the deserializer's pointer by a specified number of bytes, without
* reading them.
*
* @param size number of bytes to skip.
*/
void skip(storage_size_t size) {
if (size > size_) {
throw std::logic_error("Reading data past end of serialized data size.");
}

ptr_ += size;
size_ -= size;
}

/**
* Return remaining number of bytes to deserialize.
*
Expand Down

0 comments on commit 9623cc7

Please sign in to comment.