Skip to content

Commit

Permalink
Merge pull request #3440 from sparklyr/updates
Browse files Browse the repository at this point in the history
Fixes #3439
  • Loading branch information
edgararuiz committed May 8, 2024
2 parents 286a7d7 + 230b92c commit 22aa571
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: sparklyr
Title: R Interface to Apache Spark
Version: 1.8.6
Version: 1.8.6.9000
Authors@R:
c(person(given = "Javier",
family = "Luraschi",
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ S3method(glance,ml_model_naive_bayes)
S3method(glance,ml_model_pca)
S3method(glance,ml_model_random_forest_classification)
S3method(glance,ml_model_random_forest_regression)
S3method(head,tbl_spark)
S3method(hive_context,spark_connection)
S3method(initialize_connection,livy_connection)
S3method(initialize_connection,spark_shell_connection)
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Sparklyr (dev)

- `sdf_sql()` now returns nothing, including an error, when the query outputs an
empty dataset (#3439)

# Sparklyr 1.8.6

- Addresses issues with R 4.4.0. The root cause was that version checking functions
Expand Down
8 changes: 8 additions & 0 deletions R/dplyr_sql.R
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,11 @@ check_frac <- function(size, replace = FALSE) {
)
}

#' @export
head.tbl_spark <- function(x, n = 6L, ...) {
if (ncol(x) == 0) {
return(x)
} else {
NextMethod()
}
}

0 comments on commit 22aa571

Please sign in to comment.