Skip to content

Commit

Permalink
High-productivity afternoon
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Apr 2, 2024
1 parent e60a6c3 commit 5450dfe
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
6 changes: 3 additions & 3 deletions apis/r/src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// soma_array_reader
nanoarrowXPtr soma_array_reader(const std::string& uri, Rcpp::Nullable<Rcpp::CharacterVector> colnames, Rcpp::Nullable<Rcpp::XPtr<tiledb::QueryCondition>> qc, Rcpp::Nullable<Rcpp::List> dim_points, Rcpp::Nullable<Rcpp::List> dim_ranges, std::string batch_size, std::string result_order, const std::string& loglevel, Rcpp::Nullable<Rcpp::CharacterVector> config);
SEXP soma_array_reader(const std::string& uri, Rcpp::Nullable<Rcpp::CharacterVector> colnames, Rcpp::Nullable<Rcpp::XPtr<tiledb::QueryCondition>> qc, Rcpp::Nullable<Rcpp::List> dim_points, Rcpp::Nullable<Rcpp::List> dim_ranges, std::string batch_size, std::string result_order, const std::string& loglevel, Rcpp::Nullable<Rcpp::CharacterVector> config);
RcppExport SEXP _tiledbsoma_soma_array_reader(SEXP uriSEXP, SEXP colnamesSEXP, SEXP qcSEXP, SEXP dim_pointsSEXP, SEXP dim_rangesSEXP, SEXP batch_sizeSEXP, SEXP result_orderSEXP, SEXP loglevelSEXP, SEXP configSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Expand Down Expand Up @@ -130,7 +130,7 @@ BEGIN_RCPP
END_RCPP
}
// create_empty_arrow_table
nanoarrowXPtr create_empty_arrow_table();
SEXP create_empty_arrow_table();
RcppExport SEXP _tiledbsoma_create_empty_arrow_table() {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Expand All @@ -140,7 +140,7 @@ BEGIN_RCPP
END_RCPP

Check warning on line 140 in apis/r/src/RcppExports.cpp

View check run for this annotation

Codecov / codecov/patch

apis/r/src/RcppExports.cpp#L134-L140

Added lines #L134 - L140 were not covered by tests
}
// sr_next
nanoarrowXPtr sr_next(Rcpp::XPtr<tdbs::SOMAArray> sr);
SEXP sr_next(Rcpp::XPtr<tdbs::SOMAArray> sr);
RcppExport SEXP _tiledbsoma_sr_next(SEXP srSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Expand Down
18 changes: 9 additions & 9 deletions apis/r/src/rinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ Rcpp::XPtr<ArrowArray> array_setup_struct(Rcpp::XPtr<ArrowArray> arrxp, int64_t

//' @noRd
// [[Rcpp::export(soma_array_reader_impl)]]
nanoarrowXPtr soma_array_reader(const std::string& uri,
Rcpp::Nullable<Rcpp::CharacterVector> colnames = R_NilValue,
Rcpp::Nullable<Rcpp::XPtr<tiledb::QueryCondition>> qc = R_NilValue,
Rcpp::Nullable<Rcpp::List> dim_points = R_NilValue,
Rcpp::Nullable<Rcpp::List> dim_ranges = R_NilValue,
std::string batch_size = "auto",
std::string result_order = "auto",
const std::string& loglevel = "auto",
Rcpp::Nullable<Rcpp::CharacterVector> config = R_NilValue) {
SEXP soma_array_reader(const std::string& uri,
Rcpp::Nullable<Rcpp::CharacterVector> colnames = R_NilValue,
Rcpp::Nullable<Rcpp::XPtr<tiledb::QueryCondition>> qc = R_NilValue,
Rcpp::Nullable<Rcpp::List> dim_points = R_NilValue,
Rcpp::Nullable<Rcpp::List> dim_ranges = R_NilValue,
std::string batch_size = "auto",
std::string result_order = "auto",
const std::string& loglevel = "auto",
Rcpp::Nullable<Rcpp::CharacterVector> config = R_NilValue) {

if (loglevel != "auto") {
spdl::set_level(loglevel);
Expand Down
4 changes: 2 additions & 2 deletions apis/r/src/riterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ bool sr_complete(Rcpp::XPtr<tdbs::SOMAArray> sr) {
//' @noRd
//' @import nanoarrow
// [[Rcpp::export]]
nanoarrowXPtr create_empty_arrow_table() {
SEXP create_empty_arrow_table() {
int ncol = 0;

Check warning on line 172 in apis/r/src/riterator.cpp

View check run for this annotation

Codecov / codecov/patch

apis/r/src/riterator.cpp#L171-L172

Added lines #L171 - L172 were not covered by tests

// Schema first
Expand All @@ -193,7 +193,7 @@ nanoarrowXPtr create_empty_arrow_table() {


// [[Rcpp::export]]
nanoarrowXPtr sr_next(Rcpp::XPtr<tdbs::SOMAArray> sr) {
SEXP sr_next(Rcpp::XPtr<tdbs::SOMAArray> sr) {
check_xptr_tag<tdbs::SOMAArray>(sr);

if (sr_complete(sr)) {
Expand Down
4 changes: 0 additions & 4 deletions apis/r/src/rutilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ struct ContextWrapper {
};
typedef struct ContextWrapper ctx_wrap_t;

// some lipstick on the (plain C language) pig that is a SEXP:
// allowing the nanoarrow ArrowArray XPtr be typedef'ed
typedef SEXP nanoarrowXPtr;

inline void exitIfError(const ArrowErrorCode ec, const std::string& msg) {
if (ec != NANOARROW_OK) Rcpp::stop(msg);

Check warning on line 67 in apis/r/src/rutilities.h

View check run for this annotation

Codecov / codecov/patch

apis/r/src/rutilities.h#L67

Added line #L67 was not covered by tests
}
Expand Down

0 comments on commit 5450dfe

Please sign in to comment.