Skip to content

Commit

Permalink
Merge branch 'dev' into de/sc-27472/arrow_nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
kounelisagis authored Sep 9, 2024
2 parents 50d21c0 + edb48b1 commit 4a91c3c
Show file tree
Hide file tree
Showing 90 changed files with 2,208 additions and 1,394 deletions.
1 change: 0 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ set(TILEDB_UNIT_TEST_SOURCES
src/test-cppapi-consolidation-plan.cc
src/unit-average-cell-size.cc
src/unit-backwards_compat.cc
src/unit-bufferlist.cc
src/unit-capi-any.cc
src/unit-capi-as_built.cc
src/unit-capi-array.cc
Expand Down
4 changes: 2 additions & 2 deletions test/regression/targets/sc-53970.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static void write_array(const std::string& array_uri);

TEST_CASE(
"Subarray range expansion bug",
"[bug][sc53970][subarray-range-expansion][!shouldfail]") {
"[bug][sc53970][subarray-range-expansion]") {
std::string array_uri = "test_array_schema_dump";

// Test setup
Expand Down Expand Up @@ -78,7 +78,7 @@ TEST_CASE(

// The expected result are a single matching cell of (0, 1507468.6)
REQUIRE(dim[0] == 0);
REQUIRE(abs(attr[0] - 1507468.6) < 0.00000005);
REQUIRE(abs(attr[0] - 1507468.6f) < 0.00000005);

// Check we didn't get any extra results
REQUIRE(dim[1] == -1);
Expand Down
41 changes: 40 additions & 1 deletion test/src/test-cppapi-aggregates.cc
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ void CppAggregatesFx<T>::generate_test_params() {
nullable_ = GENERATE(true, false);
allow_dups_ = GENERATE(true, false);
set_qc_values_ = {false};
layout_values_ = {TILEDB_UNORDERED};
layout_values_ = {TILEDB_ROW_MAJOR, TILEDB_UNORDERED};
use_dim_values_ = {true, false};
if (nullable_ || !std::is_same<T, uint64_t>::value) {
use_dim_values_ = {false};
Expand All @@ -195,6 +195,12 @@ void CppAggregatesFx<T>::run_all_combinations(std::function<void()> fn) {
for (bool set_qc : set_qc_values_) {
set_qc_ = set_qc;
for (tiledb_layout_t layout : layout_values_) {
// Filter invalid combination. The legacy reader does not support
// aggregates, and we cannot automatically switch to unordered
// reads if we are requesting both the aggregates and the data.
if (request_data && layout != TILEDB_UNORDERED) {
continue;
}
layout_ = layout;
fn();
}
Expand Down Expand Up @@ -1444,6 +1450,12 @@ TEST_CASE_METHOD(
for (bool set_qc : set_qc_values_) {
set_qc_ = set_qc;
for (tiledb_layout_t layout : layout_values_) {
// Filter invalid combination. The legacy reader does not support
// aggregates, and we cannot automatically switch to unordered
// reads if we are requesting both the aggregates and the data.
if (request_data && layout != TILEDB_UNORDERED) {
continue;
}
layout_ = layout;
Query query(ctx_, array, TILEDB_READ);

Expand Down Expand Up @@ -1824,6 +1836,11 @@ TEMPLATE_LIST_TEST_CASE(
for (bool set_qc : fx.set_qc_values_) {
fx.set_qc_ = set_qc;
for (tiledb_layout_t layout : fx.layout_values_) {
// Filter invalid combination. The legacy reader does not support
// aggregates, and we cannot automatically switch to unordered
// reads if we are requesting both the aggregates and the data.
if (!fx.dense_ && request_data && layout != TILEDB_UNORDERED)
continue;
fx.layout_ = layout;
Query query(fx.ctx_, array, TILEDB_READ);

Expand Down Expand Up @@ -2048,6 +2065,12 @@ TEST_CASE_METHOD(
for (bool set_qc : set_qc_values_) {
set_qc_ = set_qc;
for (tiledb_layout_t layout : layout_values_) {
// Filter invalid combination. The legacy reader does not support
// aggregates, and we cannot automatically switch to unordered
// reads if we are requesting both the aggregates and the data.
if (request_data && layout != TILEDB_UNORDERED) {
continue;
}
layout_ = layout;
Query query(ctx_, array, TILEDB_READ);

Expand Down Expand Up @@ -2146,6 +2169,12 @@ TEST_CASE_METHOD(
for (bool set_qc : set_qc_values_) {
set_qc_ = set_qc;
for (tiledb_layout_t layout : layout_values_) {
// Filter invalid combination. The legacy reader does not support
// aggregates, and we cannot automatically switch to unordered
// reads if we are requesting both the aggregates and the data.
if (layout != TILEDB_UNORDERED) {
continue;
}
layout_ = layout;
Query query(ctx_, array, TILEDB_READ);

Expand Down Expand Up @@ -2285,6 +2314,11 @@ TEST_CASE_METHOD(
for (bool set_qc : set_qc_values_) {
set_qc_ = set_qc;
for (tiledb_layout_t layout : layout_values_) {
// Filter invalid combination. The legacy reader does not support
// aggregates, and we cannot automatically switch to unordered
// reads if we are requesting both the aggregates and the data.
if (layout != TILEDB_UNORDERED)
continue;
layout_ = layout;
Query query(ctx_, array, TILEDB_READ);

Expand Down Expand Up @@ -2365,6 +2399,11 @@ TEMPLATE_LIST_TEST_CASE_METHOD(
for (bool set_qc : CppAggregatesFx<T>::set_qc_values_) {
CppAggregatesFx<T>::set_qc_ = set_qc;
for (tiledb_layout_t layout : CppAggregatesFx<T>::layout_values_) {
// Filter invalid combination. The legacy reader does not support
// aggregates, and we cannot automatically switch to unordered
// reads if we are requesting both the aggregates and the data.
if (!CppAggregatesFx<T>::dense_ && layout != TILEDB_UNORDERED)
continue;
CppAggregatesFx<T>::layout_ = layout;
Query query(CppAggregatesFx<T>::ctx_, array, TILEDB_READ);

Expand Down
16 changes: 14 additions & 2 deletions test/src/test-cppapi-consolidation-plan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
#include "test/support/src/helpers.h"
#include "tiledb/api/c_api/buffer/buffer_api_internal.h"
#include "tiledb/api/c_api/config/config_api_internal.h"
#include "tiledb/api/c_api/context/context_api_internal.h"
#include "tiledb/sm/c_api/tiledb_serialization.h"
#include "tiledb/sm/c_api/tiledb_struct_def.h"
#include "tiledb/sm/cpp_api/tiledb"
#include "tiledb/sm/cpp_api/tiledb_experimental"
#include "tiledb/sm/enums/serialization_type.h"
Expand Down Expand Up @@ -185,8 +187,18 @@ tiledb::sm::ConsolidationPlan CppConsolidationPlanFx::call_handler(
uint64_t fragment_size,
const Array& array,
tiledb::sm::SerializationType stype) {
auto req_buf = tiledb_buffer_handle_t::make_handle();
auto resp_buf = tiledb_buffer_handle_t::make_handle();
auto req_buf = tiledb_buffer_handle_t::make_handle(
ctx_.ptr()
.get()
->resources()
.serialization_memory_tracker()
->get_resource(tiledb::sm::MemoryType::SERIALIZATION_BUFFER));
auto resp_buf = tiledb_buffer_handle_t::make_handle(
ctx_.ptr()
.get()
->resources()
.serialization_memory_tracker()
->get_resource(tiledb::sm::MemoryType::SERIALIZATION_BUFFER));

tiledb::sm::serialization::serialize_consolidation_plan_request(
fragment_size, cfg_.ptr()->config(), stype, req_buf->buffer());
Expand Down
4 changes: 2 additions & 2 deletions test/src/unit-capi-array.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2719,7 +2719,7 @@ TEST_CASE_METHOD(
start_timestamp,
end_timestamp,
tiledb::sm::SerializationType::CAPNP,
&buff->buffer());
buff->buffer());
rc = tiledb_handle_array_delete_fragments_timestamps_request(
ctx_,
array,
Expand Down Expand Up @@ -2755,7 +2755,7 @@ TEST_CASE_METHOD(
array->array_->config(),
fragments,
tiledb::sm::SerializationType::CAPNP,
&buff->buffer());
buff->buffer());
rc = tiledb_handle_array_delete_fragments_list_request(
ctx_,
array,
Expand Down
2 changes: 2 additions & 0 deletions test/src/unit-capi-config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ void check_save_to_file() {
ss << "filestore.buffer_size 104857600\n";
ss << "rest.capnp_traversal_limit 2147483648\n";
ss << "rest.curl.buffer_size 524288\n";
ss << "rest.curl.retry_errors true\n";
ss << "rest.curl.verbose false\n";
ss << "rest.http_compressor any\n";
ss << "rest.load_enumerations_on_array_open false\n";
Expand Down Expand Up @@ -609,6 +610,7 @@ TEST_CASE("C API: Test config iter", "[capi][config]") {
all_param_values["rest.retry_http_codes"] = "503";
all_param_values["rest.capnp_traversal_limit"] = "2147483648";
all_param_values["rest.curl.buffer_size"] = "524288";
all_param_values["rest.curl.retry_errors"] = "true";
all_param_values["rest.curl.verbose"] = "false";
all_param_values["rest.load_metadata_on_array_open"] = "false";
all_param_values["rest.load_non_empty_domain_on_array_open"] = "false";
Expand Down
Loading

0 comments on commit 4a91c3c

Please sign in to comment.