Skip to content

Commit

Permalink
Fix isAndromedaTable() when table belongs to descendant of Andromda.
Browse files Browse the repository at this point in the history
…Fixes #64
  • Loading branch information
schuemie committed Jun 4, 2024
1 parent 3c98ea0 commit 941a5e7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: Andromeda
Type: Package
Title: Asynchronous Disk-Based Representation of Massive Data
Version: 0.6.6
Version: 0.6.7
Date: 2024-03-21
Authors@R: c(
person("Adam", "Black", , "[email protected]", role = c("aut")),
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Andromeda 0.6.7
===============

Bugfixes

- Fix `isAndromedaTable()` when table belongs to descendant of Andromda.


Andromeda 0.6.6
===============

Expand Down
7 changes: 1 addition & 6 deletions R/Object.R
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,5 @@ checkIfValid <- function(x) {
#' close(andr)
#' }
isAndromedaTable <- function(tbl) {
return(
inherits(tbl, "FileSystemDataset") ||
inherits(tbl, "arrow_dplyr_query") ||
inherits(tbl, "tbl_Andromeda") ||
inherits(tbl, "tbl_SQLiteConnection")
)
return(inherits(tbl, "tbl") && inherits(dbplyr::remote_con(tbl), "Andromeda"))
}
6 changes: 0 additions & 6 deletions tests/testthat/test-object.R
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,6 @@ test_that("Get/set Andromeda table/column names works.", {
})

test_that("isAndromedaTable sqlite version", {
con <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
DBI::dbWriteTable(con, "cars", cars)
db <- dplyr::tbl(con, "cars")
expect_true(isAndromedaTable(db))
expect_true(isAndromedaTable(dplyr::mutate(db, a = 1)))

a <- andromeda(cars = cars)
class(a$cars)
expect_true(isAndromedaTable(a$cars))
Expand Down

0 comments on commit 941a5e7

Please sign in to comment.