More precise return value when the result set is empty.#132
Merged
eddelbuettel merged 6 commits intoTileDB-Inc:feature/select_rangesfrom Jun 19, 2020
Merged
Conversation
R/TileDBArray.R
Outdated
| if (x@as.data.frame) { | ||
| res <- do.call(data.frame, c(res, list(check.names=FALSE, stringsAsFactors=FALSE))) | ||
| } | ||
| return(invisible(res)) |
Contributor
There was a problem hiding this comment.
Thanks so much that is a very good start but not general enough. See eg here for possible types. (And to make it worse there are other routines too...)
How to map types back and forth between R and TileDB isn't fully fleshed out but we need to at least support the datetypes and int64.
Contributor
|
The fact that the checks failed is not good. The implemented method breaks some of the post 2.0.0 API accessors. So this is clearly not ready yet. |
Contributor
|
This is now quite slick with the one-liner ensuring at least one-row attempts and automagically shrinking them down later. It is a little "costly" as we will run queries we know will fail. |
eddelbuettel
added a commit
that referenced
this pull request
Jun 26, 2020
* More precise return value when the result set is empty. * Use tiledb_datatype_R_type for more comprehensive type finding. Take best shot at type determination for dates. * Minor bugfix for correct nanotime coercion. * Mimic a non-empty buffer to re-use type translation from C++ code. * Further streamlining of the intervention. * ensure one more test receive as.data.frame Co-authored-by: Dirk Eddelbuettel <edd@debian.org>
eddelbuettel
added a commit
that referenced
this pull request
Jun 29, 2020
* generalized range selection also taking optional range matrices * add unit tests * updated documentation * adding setter and getter for selected_ranges * modified tests * robustification for part one of @LTLA's note * do not use require domain() info * make est_res_size result use more tolerant * correct subsetting to allow empty result sets * additional tests * correct one index variable * More precise return value when the result set is empty. (#132) * More precise return value when the result set is empty. * Use tiledb_datatype_R_type for more comprehensive type finding. Take best shot at type determination for dates. * Minor bugfix for correct nanotime coercion. * Mimic a non-empty buffer to re-use type translation from C++ code. * Further streamlining of the intervention. * ensure one more test receive as.data.frame Co-authored-by: Dirk Eddelbuettel <edd@debian.org> * add a NEWS entry * show selected_ranges, add simple validator * more robust validity check for selected_ranges * add simple TileDB Cloud example * correct typo (and change whitespace accordingly) Co-authored-by: Aaron Lun <LTLA@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As suggested in LTLA/TileDBArray#9 (comment).