Skip to content

Commit

Permalink
code-review feedback
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Hoffman <mojaveazure@users.noreply.github.com>
  • Loading branch information
johnkerl and mojaveazure authored Oct 25, 2024
1 parent d4140c4 commit 5f82149
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion R/TileDBArray.R
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,12 @@ setMethod("[", "tiledb_array",
MoreArgs=list(qryptr=qryptr), SIMPLIFY=TRUE)
## ensure > 0 for correct handling of zero-length outputs, ensure respecting memory budget
spdl::debug("['['] result of size estimates is {}", paste(ressizes, collapse=","))
.idx_lgl <- ressizes > 0; ressizes <- if (any(.idx_lgl)) ressizes[ressizes > 0] else 0
idx <- ressizes > 0
ressizes <- if (any(idx)) {
ressizes[idx]
} else {
0
}
resrv <- max(1, min(memory_budget/8, ressizes))
spdl::debug("['['] overall estimate {} rows", resrv)

Expand Down

0 comments on commit 5f82149

Please sign in to comment.