-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into rr/sc-60366-sparse-gl…
…obal-order-reader-merge
- Loading branch information
Showing
26 changed files
with
484 additions
and
598 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ on: | |
workflow_dispatch: | ||
push: | ||
branches: | ||
- dev | ||
- main | ||
- release-* | ||
- refs/tags/* | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ on: | |
type: boolean | ||
push: | ||
branches: | ||
- dev | ||
- main | ||
- release-* | ||
|
||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|
@@ -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 | ||
|
||
|
@@ -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) | ||
|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.