From 84172df1f6ecc1ce616145419ffdefe9ce587b37 Mon Sep 17 00:00:00 2001 From: "Paul J. Davis" Date: Thu, 31 Aug 2023 12:47:47 -0500 Subject: [PATCH] Add config values for Enumeration v2 serialization --- test/src/unit-capi-config.cc | 6 ++++++ tiledb/sm/config/config.cc | 4 ++++ tiledb/sm/config/config.h | 3 +++ 3 files changed, 13 insertions(+) diff --git a/test/src/unit-capi-config.cc b/test/src/unit-capi-config.cc index 4e6ae8a6f7f..72f08912c69 100644 --- a/test/src/unit-capi-config.cc +++ b/test/src/unit-capi-config.cc @@ -230,6 +230,7 @@ void check_save_to_file() { ss << "rest.curl.buffer_size 524288\n"; ss << "rest.curl.verbose false\n"; ss << "rest.http_compressor any\n"; + ss << "rest.load_enumerations_on_array_open true\n"; ss << "rest.load_metadata_on_array_open true\n"; ss << "rest.load_non_empty_domain_on_array_open true\n"; ss << "rest.retry_count 25\n"; @@ -566,6 +567,10 @@ TEST_CASE("C API: Test config iter", "[capi][config]") { config, "rest.load_non_empty_domain_on_array_open", "false", &error); CHECK(rc == TILEDB_OK); CHECK(error == nullptr); + rc = tiledb_config_set( + config, "rest.load_enumerations_on_array_open", "false", &error); + CHECK(rc == TILEDB_OK); + CHECK(error == nullptr); rc = tiledb_config_set( config, "rest.use_refactored_array_open", "true", &error); CHECK(rc == TILEDB_OK); @@ -600,6 +605,7 @@ TEST_CASE("C API: Test config iter", "[capi][config]") { 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"; + all_param_values["rest.load_enumerations_on_array_open"] = "false"; all_param_values["rest.use_refactored_array_open"] = "true"; all_param_values["rest.use_refactored_array_open_and_query_submit"] = "true"; all_param_values["sm.allow_separate_attribute_writes"] = "false"; diff --git a/tiledb/sm/config/config.cc b/tiledb/sm/config/config.cc index fe4f81edcde..31c731dc50d 100644 --- a/tiledb/sm/config/config.cc +++ b/tiledb/sm/config/config.cc @@ -91,6 +91,7 @@ const std::string Config::REST_RETRY_DELAY_FACTOR = "1.25"; const std::string Config::REST_CURL_BUFFER_SIZE = "524288"; const std::string Config::REST_CAPNP_TRAVERSAL_LIMIT = "536870912"; const std::string Config::REST_CURL_VERBOSE = "false"; +const std::string Config::REST_LOAD_ENUMERATIONS_ON_ARRAY_OPEN = "true"; const std::string Config::REST_LOAD_METADATA_ON_ARRAY_OPEN = "true"; const std::string Config::REST_LOAD_NON_EMPTY_DOMAIN_ON_ARRAY_OPEN = "true"; const std::string Config::REST_USE_REFACTORED_ARRAY_OPEN = "false"; @@ -243,6 +244,9 @@ const std::map default_config_values = { std::make_pair( "rest.capnp_traversal_limit", Config::REST_CAPNP_TRAVERSAL_LIMIT), std::make_pair("rest.curl.verbose", Config::REST_CURL_VERBOSE), + std::make_pair( + "rest.load_enumerations_on_array_open", + Config::REST_LOAD_ENUMERATIONS_ON_ARRAY_OPEN), std::make_pair( "rest.load_metadata_on_array_open", Config::REST_LOAD_METADATA_ON_ARRAY_OPEN), diff --git a/tiledb/sm/config/config.h b/tiledb/sm/config/config.h index 0baf67a622f..4981fa1b39f 100644 --- a/tiledb/sm/config/config.h +++ b/tiledb/sm/config/config.h @@ -102,6 +102,9 @@ class Config { /** The default for Curl's verbose mode used by REST. */ static const std::string REST_CURL_VERBOSE; + /** If the array enumerations should be loaded on array open */ + static const std::string REST_LOAD_ENUMERATIONS_ON_ARRAY_OPEN; + /** If the array metadata should be loaded on array open */ static const std::string REST_LOAD_METADATA_ON_ARRAY_OPEN;