Skip to content

Commit f7248b2

Browse files
committed
isolating rJava
1 parent 41729ce commit f7248b2

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

R/jdbc.r

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
#' }
2828
drill_jdbc <- function(nodes="localhost:2181", cluster_id=NULL, schema=NULL, use_zk=TRUE) {
2929

30+
if (!requireNamespace("rJava")) {
31+
stop("RJDBC & rJava are required to use the Drill JDBC connectors", .call=FALSE)
32+
}
33+
3034
if (!requireNamespace("RJDBC")) {
3135
stop("RJDBC & rJava are required to use the Drill JDBC connectors", .call=FALSE)
3236
}

R/query.r

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ drill_query <- function(drill_con, query, uplift=TRUE, .progress=interactive())
2424

2525
if (inherits(drill_con, "JDBCConnection")) {
2626

27+
if (!requireNamespace("rJava")) {
28+
stop("RJDBC & rJava are required to use the Drill JDBC connectors", .call=FALSE)
29+
}
30+
2731
if (!requireNamespace("RJDBC")) {
2832
stop("RJDBC & rJava are required to use the Drill JDBC connectors", .call=FALSE)
2933
}

R/zzz.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
.onLoad <- function(libname, pkgname) {
2-
if (requireNamespace("rJava")) rJava::.jpackage(pkgname, lib.loc = libname)
3-
}
1+
# .onLoad <- function(libname, pkgname) {
2+
# if (requireNamespace("rJava")) rJava::.jpackage(pkgname, lib.loc = libname)
3+
# }

man/DrillConnection-class.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)