~hrbrmstr/sergeant

b41d12bf1bb0e0f865a9a30f082b04d34b3b9a74 — hrbrmstr 2 years ago ff6c1f6
Fix Travis errors
7 files changed, 14 insertions(+), 6 deletions(-)

M DESCRIPTION
M NAMESPACE
M R/ctas-profile.R
M R/dbi.r
M R/drill-docker.R
M R/sergeant-package.r
M man/sergeant.Rd
M DESCRIPTION => DESCRIPTION +1 -0
@@ 35,6 35,7 @@ Imports:
    magrittr (>= 1.5)
Suggests:
    DT (>= 0.5),
    stevedore,
    testthat (>= 1.0.2),
    covr (>= 3.0.0)
RoxygenNote: 6.1.1

M NAMESPACE => NAMESPACE +2 -0
@@ 75,6 75,7 @@ importFrom(dbplyr,win_recycled)
importFrom(dplyr,bind_cols)
importFrom(dplyr,bind_rows)
importFrom(dplyr,case_when)
importFrom(dplyr,collect)
importFrom(dplyr,copy_to)
importFrom(dplyr,data_frame)
importFrom(dplyr,db_data_type)


@@ 94,4 95,5 @@ importFrom(purrr,"%>%")
importFrom(purrr,map)
importFrom(purrr,map2)
importFrom(purrr,map2_df)
importFrom(readr,type_convert)
importFrom(scales,comma)

M R/ctas-profile.R => R/ctas-profile.R +2 -2
@@ 30,9 30,9 @@ ctas_profile <- function(x, new_table_name = "CHANGE____ME") {

  stopifnot(inherits(x, "tbl_drill"))

  vals <- collect(head(x))
  vals <- dplyr::collect(head(x))

  vals <- suppressMessages(type_convert(vals))
  vals <- suppressMessages(readr::type_convert(vals))

  data_type <- function(x) {
    switch(

M R/dbi.r => R/dbi.r +1 -1
@@ 394,7 394,7 @@ setMethod(

    out <- httr::content(res, as = "text", encoding = "UTF-8")

    out <- jsonlite::fromJSON(out, flatten = TRUE)
    xdf <- jsonlite::fromJSON(out, flatten = TRUE)

    if (length(out$columns) != 0) {
      return(out$columns)

M R/drill-docker.R => R/drill-docker.R +4 -0
@@ 37,6 37,10 @@ drill_up <- function(image = "drill/apache-drill:1.15.0",

  stopifnot(dir.exists(data_dir))

  if (!requireNamespace("stevedore", quietly = TRUE)) {
    stop("The stevedore must be installed to use this function")
  }

  docker <- stevedore::docker_client()

  docker$container$run(

M R/sergeant-package.r => R/sergeant-package.r +3 -2
@@ 20,7 20,7 @@
#' You can install and run a Drillbit service on one node or on many nodes to form a
#' distributed cluster environment. When a Drillbit runs on each data node in a cluster,
#' Drill can maximize data locality during query execution without moving data over the
#' network or between nodes. Drill uses ZooKeeper to maintain cluster membership and health
#' network or between nodes. Drill uses Zookeeper to maintain cluster membership and health
#' check information.
#'
#' Methods are provided to work with Drill via the REST APIs along with R


@@ 33,9 33,10 @@
#' @import utils DBI methods bit64 httr jsonlite htmltools bit64
#' @importFrom scales comma
#' @importFrom purrr map map2 map2_df %>%
#' @importFrom readr type_convert
#' @importFrom dplyr mutate select left_join bind_cols bind_rows data_frame tbl filter
#' @importFrom dplyr db_desc src db_data_type db_explain sql_translate_env copy_to
#' @importFrom dplyr db_query_fields src_tbls sql_escape_ident case_when
#' @importFrom dplyr db_query_fields src_tbls sql_escape_ident case_when collect
#' @importFrom dbplyr build_sql sql_prefix sql_quote src_sql tbl_sql
#' @importFrom dbplyr win_recycled win_current_group base_win base_agg base_scalar win_over sql
NULL

M man/sergeant.Rd => man/sergeant.Rd +1 -1
@@ 27,7 27,7 @@ the client.
You can install and run a Drillbit service on one node or on many nodes to form a
distributed cluster environment. When a Drillbit runs on each data node in a cluster,
Drill can maximize data locality during query execution without moving data over the
network or between nodes. Drill uses ZooKeeper to maintain cluster membership and health
network or between nodes. Drill uses Zookeeper to maintain cluster membership and health
check information.

Methods are provided to work with Drill via the REST APIs along with R