Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into rr/sc-60366-sparse-gl…
Browse files Browse the repository at this point in the history
…obal-order-reader-merge
  • Loading branch information
rroelke committed Jan 8, 2025
2 parents 7e79b1e + 3eda3c1 commit c49d4a0
Show file tree
Hide file tree
Showing 26 changed files with 484 additions and 598 deletions.
2 changes: 1 addition & 1 deletion .github/DIRECTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ the version-specific tests. This fan-out setup reduces the runtime of each job f

## Documentation

Documentation is built by `workflows/build-docs.yml` using `<root>/scripts/ci/build_docs.sh`.
Documentation is built by `workflows/build-docs.yml` using `<root>/scripts/ci/build_docs.sh`.
2 changes: 1 addition & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: build-docs
on:
push:
branches:
- dev
- main
- 'release-*'
paths-ignore:
- '.github/workflows/quarto-render.yml'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-2019, windows-2022]
os: [windows-2022]
#considering https://stackoverflow.com/questions/65035256/how-to-access-matrix-variables-in-github-actions
environ: [azure, s3, gcs, serialization]
include:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/full-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_dispatch:
push:
branches:
- dev
- main
- release-*
- refs/tags/*

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/nightly-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
- os: macos-latest
experimental: ON
- os: windows-latest
- os: windows-2019
- os: windows-latest
config: "Debug"
# Insufficient space on default D:/ for debug build
Expand Down Expand Up @@ -83,7 +82,7 @@ jobs:
include:
- os: ubuntu-latest
triplet: x64-linux
- os: windows-2019
- os: windows-2022
triplet: x64-windows
- os: macos-13
triplet: x64-osx
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/quarto-render.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Render and deploy Quarto files
on:
push:
# publish on merge only
branches: dev
branches: main
# when changes match any path below
paths:
- '.github/workflows/quarto-render.yml'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
push:
branches:
- dev
- main
- 'release-*'
tags:
- '*'
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
matrix:
include:
- platform: windows-x86_64
os: windows-2019
os: windows-2022
triplet: x64-windows-release
- platform: linux-x86_64
os: ubuntu-20.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-cloud-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
type: boolean
push:
branches:
- dev
- main
- release-*

env:
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ stages:
trigger_pipeline:
stage: test
rules:
- if: $CI_COMMIT_BRANCH =~ /^dev|^release-.*/ || $CI_COMMIT_TAG != "" # only/except rules are no longer actively developed. Please use `rules` instead.
- if: $CI_COMMIT_BRANCH =~ /^main|^release-.*/ || $CI_COMMIT_TAG != "" # only/except rules are no longer actively developed. Please use `rules` instead.
- if: $CI_PIPELINE_SOURCE == "external_pull_request_event"
changes:
- "!.github/workflows/quarto-render.yml"
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ else()
endif()
endif()

if (CMAKE_CXX_COMPILER_ID MATCHES "AppleClang" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL "16")
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL "16")
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fexperimental-library>)
endif()
endif()
Expand Down
15 changes: 7 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ help you file issues, bug reports, or contribute code to the open source TileDB

## Contribution Checklist:

* Reporting a bug? Please read [how to file a bug report](https://github.com/TileDB-Inc/TileDB/blob/dev/CONTRIBUTING.md#reporting-a-bug) section to make sure sufficient information is included.
* Reporting a bug? Please read [how to file a bug report](https://github.com/TileDB-Inc/TileDB/blob/main/CONTRIBUTING.md#reporting-a-bug) section to make sure sufficient information is included.

* Contributing code? You rock! Be sure to [review the contributor section](https://github.com/TileDB-Inc/TileDB/blob/dev/CONTRIBUTING.md#contributing-code) for helpful tips on the tools we use to build TileDB, format code, and issue pull requests (PR)'s.
* Contributing code? You rock! Be sure to [review the contributor section](https://github.com/TileDB-Inc/TileDB/blob/main/CONTRIBUTING.md#contributing-code) for helpful tips on the tools we use to build TileDB, format code, and issue pull requests (PR)'s.

## Reporting a Bug

Expand All @@ -16,7 +16,7 @@ A useful bug report filed as a GitHub issue provides information about how to re
1. Before opening a new [GitHub issue](https://github.com/TileDB-Inc/TileDB/issues) try searching the existing issues to see if someone else has already noticed the same problem.

2. When filing a bug report, provide where possible:
- The version TileDB (`tiledb_version()`) or if a `dev` version, specific commit that triggers the error.
- The version TileDB (`tiledb_version()`) or if a `main` version, specific commit that triggers the error.
- The full error message, including the backtrace (if possible). Verbose error reporting is enabled by building TileDB with `../bootstrap --enable-verbose`.
- A minimal working example, i.e. the smallest chunk of code that triggers the error. Ideally, this should be code that can be a small reduced C / C++ source file. If the code to reproduce is somewhat long, consider putting it in a [gist](https://gist.github.com).

Expand All @@ -25,7 +25,7 @@ A useful bug report filed as a GitHub issue provides information about how to re

## Contributing Code

*By contributing code to TileDB, you are agreeing to release it under the [MIT License](https://github.com/TileDB-Inc/TileDB/tree/dev/LICENSE).*
*By contributing code to TileDB, you are agreeing to release it under the [MIT License](https://github.com/TileDB-Inc/TileDB/tree/main/LICENSE).*

### Quickstart Workflow:

Expand All @@ -49,8 +49,7 @@ for dependencies and detailed build instructions.
[Issue a PR from your updated TileDB fork](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)

Branch conventions:
- `dev` is the development branch of TileDB, all PR's are merged into `dev`.
- `master` tracks the latest stable / released version of TileDB.
- `main` is the development branch of TileDB, all PR's are merged into `main`.
- `release-x.y.z` are major / bugfix release branches of TileDB.

Formatting conventions:
Expand All @@ -63,13 +62,13 @@ Formatting conventions:

### Pull Requests:

- `dev` is the development branch, all PR’s should be rebased on top of the latest `dev` commit.
- `main` is the development branch, all PR’s should be rebased on top of the latest `main` commit.

- Commit changes to a local branch. The convention is to use your initials to identify branches: (ex. “Fred Jones” , `fj/my_bugfix_branch`). Branch names should be identifiable and reflect the feature or bug that they want to address / fix. This helps in deleting old branches later.

- Make sure the test suite passes by running `make check`.

- When ready to submit a PR, `git rebase` the branch on top of the latest `dev` commit. Be sure to squash / cleanup the commit history so that the PR preferably one, or a couple commits at most. Each atomic commit in a PR should be able to pass the test suite.
- When ready to submit a PR, `git rebase` the branch on top of the latest `main` commit. Be sure to squash / cleanup the commit history so that the PR preferably one, or a couple commits at most. Each atomic commit in a PR should be able to pass the test suite.

- Run the limiting / code format tooling (`make format`) before submitting a final PR.
Make sure that your contribution generally follows the format and naming conventions used by surrounding code.
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<a href="https://tiledb.com"><img src="https://github.com/TileDB-Inc/TileDB/raw/dev/doc/source/_static/[email protected]" alt="TileDB logo" width="400"></a>
<a href="https://tiledb.com"><img src="https://github.com/TileDB-Inc/TileDB/raw/main/doc/source/_static/[email protected]" alt="TileDB logo" width="400"></a>

[![Full CI](https://github.com/TileDB-Inc/TileDB/actions/workflows/full-ci.yml/badge.svg?branch=dev)](https://github.com/TileDB-Inc/TileDB/actions/workflows/full-ci.yml) [![Azure Pipelines](https://dev.azure.com/TileDB-Inc/CI/_apis/build/status/TileDB-Inc.TileDB?branchName=dev)](https://dev.azure.com/TileDB-Inc/CI/_build/latest?definitionId=2&branchName=dev) [![](doc/anaconda.svg)![Anaconda download count badge](https://anaconda.org/conda-forge/TileDB/badges/downloads.svg)](https://anaconda.org/conda-forge/TileDB)
[![Full CI](https://github.com/TileDB-Inc/TileDB/actions/workflows/full-ci.yml/badge.svg?branch=main)](https://github.com/TileDB-Inc/TileDB/actions/workflows/full-ci.yml) [![Azure Pipelines](https://dev.azure.com/TileDB-Inc/CI/_apis/build/status/TileDB-Inc.TileDB?branchName=main)](https://dev.azure.com/TileDB-Inc/CI/_build/latest?definitionId=2&branchName=main) [![](doc/anaconda.svg)![Anaconda download count badge](https://anaconda.org/conda-forge/TileDB/badges/downloads.svg)](https://anaconda.org/conda-forge/TileDB)

# The Universal Storage Engine

Expand Down Expand Up @@ -41,10 +41,10 @@ $ docker pull tiledb/tiledb
$ docker run -it tiledb/tiledb
```

We include several [examples](https://github.com/TileDB-Inc/TileDB/tree/dev/examples). You can start with the following:
We include several [examples](https://github.com/TileDB-Inc/TileDB/tree/main/examples). You can start with the following:

* [Dense array example](https://github.com/TileDB-Inc/TileDB/blob/dev/examples/cpp_api/quickstart_dense.cc)
* [Sparse array example](https://github.com/TileDB-Inc/TileDB/blob/dev/examples/cpp_api/quickstart_sparse.cc)
* [Dense array example](https://github.com/TileDB-Inc/TileDB/blob/main/examples/cpp_api/quickstart_dense.cc)
* [Sparse array example](https://github.com/TileDB-Inc/TileDB/blob/main/examples/cpp_api/quickstart_sparse.cc)

## Documentation

Expand All @@ -71,8 +71,8 @@ The TileDB data format is open-source and can be found [here](format_spec/FORMAT

The TileDB team maintains a variety of APIs built on top of the C++ library:

* C ([examples](https://github.com/TileDB-Inc/TileDB/tree/dev/examples/c_api), [API docs](https://tiledb-inc-tiledb.readthedocs-hosted.com/en/stable/c-api.html))
* C++ ([examples](https://github.com/TileDB-Inc/TileDB/tree/dev/examples/cpp_api), [API docs](https://tiledb-inc-tiledb.readthedocs-hosted.com/en/stable/c++-api.html))
* C ([examples](https://github.com/TileDB-Inc/TileDB/tree/main/examples/c_api), [API docs](https://tiledb-inc-tiledb.readthedocs-hosted.com/en/stable/c-api.html))
* C++ ([examples](https://github.com/TileDB-Inc/TileDB/tree/main/examples/cpp_api), [API docs](https://tiledb-inc-tiledb.readthedocs-hosted.com/en/stable/c++-api.html))
* [Python](https://github.com/TileDB-Inc/TileDB-Py)
* [R](https://github.com/TileDB-Inc/TileDB-R)
* [Java](https://github.com/TileDB-Inc/TileDB-Java)
Expand All @@ -91,6 +91,6 @@ TileDB is also integrated with several popular databases and data science tools:

## Get involved

TileDB Embedded is an open-source project and welcomes all forms of contributions. Contributors to the project should read over the [contribution docs](https://github.com/TileDB-Inc/TileDB/blob/dev/CONTRIBUTING.md) for more information.
TileDB Embedded is an open-source project and welcomes all forms of contributions. Contributors to the project should read over the [contribution docs](https://github.com/TileDB-Inc/TileDB/blob/main/CONTRIBUTING.md) for more information.

We'd love to hear from you. Drop us a line at [[email protected]](mailto:[email protected]), visit our [forum](https://forum.tiledb.com/) or [contact form](https://tiledb.com/contact), or [follow us on Twitter](https://twitter.com/tiledb) to stay informed of updates and news.
2 changes: 1 addition & 1 deletion bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ while test $# != 0; do
--dependency=*) dir=`arg "$1"`
dependency_dir="$dir";;
--linkage=*) linkage=`arg "$1"`;;
--force-build-all-deps) echo "Argument '--force-build-all-deps' has no effect and will be removed in a future version. Vcpkg builds all dependencies by default, please consult the guide in doc/dev/BUILD.md or vcpkg's documentation to see how to provide your own dependencies.";;
--force-build-all-deps) echo "Argument '--force-build-all-deps' has no effect and will be removed in a future version. Vcpkg builds all dependencies by default, please consult the guide in doc/main/BUILD.md or vcpkg's documentation to see how to provide your own dependencies.";;
--remove-deprecations) tiledb_remove_deprecations="ON";;
--disable-werror) tiledb_werror="OFF";;
--disable-tests) tiledb_tests="OFF";;
Expand Down
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ set(TILEDB_UNIT_TEST_SOURCES
src/unit-ctx.cc
src/unit-current-domain-rest.cc
src/unit-dense-reader.cc
src/unit-dense-global-order-reader.cc
src/unit-DenseTiler.cc
src/unit-dimension.cc
src/unit-duplicates.cc
Expand Down
107 changes: 107 additions & 0 deletions test/src/unit-dense-global-order-reader.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
/**
* @file unit-dense-global-order-reader.cc
*
* @section LICENSE
*
* The MIT License
*
* @copyright Copyright (c) 2025 TileDB, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

#include <test/support/tdb_catch.h>
#include "test/support/src/vfs_helpers.h"
#include "tiledb/sm/cpp_api/tiledb"

using namespace tiledb;

static void create_array(Context& ctx, const std::string& array_uri);
static void write_array(
Context& ctx, const std::string& array_uri, tiledb_layout_t layout);

TEST_CASE(
"SC-60301: Read data with global cell order returns fill values",
"[dense-reader][bug][global-cell-order][fixed][sc60301]") {
test::VFSTestSetup vfs_test_setup;
const std::string array_uri =
vfs_test_setup.array_uri("dense_global_cell_order");
Context ctx{vfs_test_setup.ctx()};

// Test setup
create_array(ctx, array_uri);
auto write_layout =
GENERATE(TILEDB_ROW_MAJOR, TILEDB_COL_MAJOR, TILEDB_GLOBAL_ORDER);
write_array(ctx, array_uri, write_layout);

Array array(ctx, array_uri, TILEDB_READ);
Subarray subarray(ctx, array);
subarray.set_subarray({1, 2, 1, 2});
std::vector<int> a_read;
a_read.resize(4);
Query query(ctx, array);
query.set_subarray(subarray)
.set_layout(TILEDB_GLOBAL_ORDER)
.set_data_buffer("a", a_read);

REQUIRE(query.submit() == Query::Status::COMPLETE);

if (write_layout == TILEDB_ROW_MAJOR) {
REQUIRE(a_read[0] == 1);
REQUIRE(a_read[1] == 3);
REQUIRE(a_read[2] == 2);
REQUIRE(a_read[3] == 4);
} else {
REQUIRE(a_read[0] == 1);
REQUIRE(a_read[1] == 2);
REQUIRE(a_read[2] == 3);
REQUIRE(a_read[3] == 4);
}

array.close();
}

void create_array(Context& ctx, const std::string& array_uri) {
auto obj = Object::object(ctx, array_uri);
if (obj.type() != Object::Type::Invalid) {
Object::remove(ctx, array_uri);
}

Domain domain(ctx);
domain.add_dimension(Dimension::create<int>(ctx, "d1", {{1, 2}}, 2))
.add_dimension(Dimension::create<int>(ctx, "d2", {{1, 2}}, 2));

// Create the array schema with col-major cell order and tile order
ArraySchema schema(ctx, TILEDB_DENSE);
schema.set_domain(domain)
.set_order({{TILEDB_COL_MAJOR, TILEDB_COL_MAJOR}})
.add_attribute(Attribute::create<int>(ctx, "a"));
Array::create(ctx, array_uri, schema);
}

void write_array(
Context& ctx, const std::string& array_uri, tiledb_layout_t layout) {
std::vector<int> data = {1, 2, 3, 4};
Array array(ctx, array_uri, TILEDB_WRITE);
Query query(ctx, array);
query.set_layout(layout).set_data_buffer("a", data);
REQUIRE(query.submit() == Query::Status::COMPLETE);
query.finalize();
array.close();
}
3 changes: 1 addition & 2 deletions test/src/unit-vfs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -786,9 +786,8 @@ TEST_CASE("VFS: Construct Azure Blob Storage endpoint URIs", "[azure][uri]") {
// perform any requests) to prevent Entra ID from being chosen.
require_tiledb_ok(config.set("vfs.azure.storage_account_key", "foobar"));
}
tiledb::sm::Azure azure;
ThreadPool thread_pool(1);
require_tiledb_ok(azure.init(config, &thread_pool));
tiledb::sm::Azure azure(&thread_pool, config);
REQUIRE(azure.client().GetUrl() == expected_endpoint);
}
#endif
Expand Down
4 changes: 0 additions & 4 deletions tiledb/common/exception/status.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,6 @@ inline Status Status_UtilsError(const std::string& msg) {
inline Status Status_S3Error(const std::string& msg) {
return {"[TileDB::S3] Error", msg};
}
/** Return a FS_AZURE error class Status with a given message **/
inline Status Status_AzureError(const std::string& msg) {
return {"[TileDB::Azure] Error", msg};
}
/** Return a FS_GCS error class Status with a given message **/
inline Status Status_GCSError(const std::string& msg) {
return {"[TileDB::GCS] Error", msg};
Expand Down
Loading

0 comments on commit c49d4a0

Please sign in to comment.