diff --git a/apis/r/src/rinterface.cpp b/apis/r/src/rinterface.cpp index b67afa7cb8..b3bd33670c 100644 --- a/apis/r/src/rinterface.cpp +++ b/apis/r/src/rinterface.cpp @@ -80,7 +80,7 @@ Rcpp::List soma_array_reader(const std::string& uri, auto sr = tdbs::SOMAArray::open(OpenMode::read, uri, "unnamed", // name parameter could be added - platform_config, // to add, done in iterated reader + platform_config, column_names, batch_size, tdb_result_order); diff --git a/apis/r/src/riterator.cpp b/apis/r/src/riterator.cpp index 759e1081d0..73ce662886 100644 --- a/apis/r/src/riterator.cpp +++ b/apis/r/src/riterator.cpp @@ -88,17 +88,10 @@ Rcpp::XPtr sr_setup(const std::string& uri, std::string_view name = "unnamed"; std::vector column_names = {}; - - std::shared_ptr ctxptr = nullptr; - - std::map platform_config = config_vector_to_map(Rcpp::wrap(config)); - tiledb::Config cfg(platform_config); - spdl::debug("[sr_setup] Creating ctx object with supplied config"); - ctxptr = std::make_shared(cfg); - if (!colnames.isNull()) { column_names = Rcpp::as>(colnames); } + std::map platform_config = config_vector_to_map(Rcpp::wrap(config)); std::uint64_t ts_start = 0; // beginning of time aka the epoch (force double signature) std::uint64_t ts_end = std::numeric_limits::max(); // max if unset @@ -109,7 +102,7 @@ Rcpp::XPtr sr_setup(const std::string& uri, auto tdb_result_order = get_tdb_result_order(result_order); - auto ptr = new tdbs::SOMAArray(OpenMode::read, uri, name, ctxptr, column_names, batch_size, + auto ptr = new tdbs::SOMAArray(OpenMode::read, uri, name, platform_config, column_names, batch_size, tdb_result_order, std::make_pair(ts_start, ts_end)); std::unordered_map> name2dim;