Skip to content

Commit

Permalink
Add config values for Enumeration v2 serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
davisp committed Aug 31, 2023
1 parent 9110daa commit 84172df
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/src/unit-capi-config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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";
Expand Down
4 changes: 4 additions & 0 deletions tiledb/sm/config/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -243,6 +244,9 @@ const std::map<std::string, std::string> 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),
Expand Down
3 changes: 3 additions & 0 deletions tiledb/sm/config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 84172df

Please sign in to comment.