Skip to content

Commit c3e64bb

Browse files
committed
Merge pull request #48 from prestodb/cran_fixes
Cran fixes - this is the latest state that appears on CRAN as v1.2.0.
2 parents d90e454 + bc3ddd7 commit c3e64bb

39 files changed

+354
-150
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
^CONTRIBUTING\.md$
22
^PATENTS$
33
^RPresto\.Rproj$
4+
^cran-comments\.md$

DESCRIPTION

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
Package: RPresto
2-
Title: DBI connector to Presto
3-
Version: 1.1.1
2+
Title: DBI Connector to Presto
3+
Version: 1.2.0
44
Authors@R: c(
55
person('Onur Ismail', 'Filiz', , '[email protected]', role=c('aut', 'cre')),
66
person('Sergey', 'Goder', , '[email protected]', role='aut'),
77
person('John Myles', 'White', , '[email protected]', role='ctb')
88
)
9-
Description: A DBI-compliant interface to Presto.
9+
Copyright: Facebook, Inc. 2015-present.
10+
Description: Implements a DBI compliant interface to Presto. Presto is
11+
an open source distributed SQL query engine for running interactive
12+
analytic queries against data sources of all sizes ranging from
13+
gigabytes to petabytes: <https://prestodb.io/>.
1014
Depends:
1115
R (>= 3.1.0),
1216
methods
@@ -15,13 +19,15 @@ Imports:
1519
httr (>= 0.6),
1620
RCurl,
1721
jsonlite,
18-
stringi
22+
stringi,
23+
stats
1924
Suggests:
2025
testthat,
21-
dplyr (>= 0.4.1)
26+
dplyr (>= 0.4.3)
2227
License: BSD_3_clause + file LICENSE
2328
URL: https://github.com/prestodb/RPresto
2429
BugReports: https://github.com/prestodb/RPresto/issues
30+
Encoding: UTF-8
2531
LazyData: true
2632
Collate:
2733
'PrestoDriver.R'
@@ -58,3 +64,4 @@ Collate:
5864
'src.presto.R'
5965
'src.translate.env.src.presto.R'
6066
'tbl.src.presto.R'
67+
RoxygenNote: 5.0.1

LICENSE

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,3 @@
1-
BSD License
2-
3-
For RPresto software
4-
5-
Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
6-
7-
Redistribution and use in source and binary forms, with or without modification,
8-
are permitted provided that the following conditions are met:
9-
10-
* Redistributions of source code must retain the above copyright notice, this
11-
list of conditions and the following disclaimer.
12-
13-
* Redistributions in binary form must reproduce the above copyright notice,
14-
this list of conditions and the following disclaimer in the documentation
15-
and/or other materials provided with the distribution.
16-
17-
* Neither the name Facebook nor the names of its contributors may be used to
18-
endorse or promote products derived from this software without specific
19-
prior written permission.
20-
21-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
25-
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
28-
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1+
YEAR: 2015-present
2+
COPYRIGHT HOLDER: Facebook, Inc. All rights reserved.
3+
ORGANIZATION: Facebook

NAMESPACE

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated by roxygen2 (4.1.1): do not edit by hand
1+
# Generated by roxygen2: do not edit by hand
22

33
export(Presto)
44
export(copy_to.src_presto)
@@ -31,7 +31,10 @@ exportMethods(dbUnloadDriver)
3131
exportMethods(fetch)
3232
exportMethods(show)
3333
import(DBI)
34+
importFrom(methods,getPackageName)
35+
importFrom(methods,new)
3436
importFrom(methods,setClass)
3537
importFrom(methods,setGeneric)
3638
importFrom(methods,setMethod)
3739
importFrom(methods,setRefClass)
40+
importFrom(methods,show)

NEWS.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# RPresto 1.2.0
2+
3+
- Add a `session.timezone` parameter to `dbConnect` and `src_presto` which
4+
defaults to UTC. This affects the timestamps returned for Presto data types
5+
"TIMESTAMP". We handle the ambiguity by assigning a time zone to _every_
6+
POSIXct column returned. Note that if you are doing `as.character()` directly
7+
on these columns, the values you obtain will be different from what happened
8+
before.
9+
- Fix the way we handle zero row multiple column query results. This will
10+
affect `LIMIT 0` queries specifically.
11+
12+
# RPresto 1.1.1
13+
14+
- Minor dplyr related fixes
15+
- Drop the R version requirement from 3.1.1 to 3.1.0
16+
- Speed-up in binding chunks if dplyr is available.
17+
- Handle special values like Infinity, NaN.
18+
19+
# RPresto 1.1.0
20+
21+
- Add optional dplyr support. One can initiate a connection via `src_presto`.
22+
- Minor documentation fixes.
23+
24+
# RPresto 1.0.0
25+
26+
- Initial release to github

R/PrestoDriver.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
#'
1111
#' @keywords internal
1212
#' @export
13+
#' @importFrom methods setClass setGeneric setMethod setRefClass
14+
#' @importFrom methods show getPackageName new
15+
#' @import DBI
1316
setClass('PrestoDriver',
1417
contains='DBIDriver'
1518
)

R/PrestoResult.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ NULL
1111
#' An S4 class to represent a Presto Result
1212
#' @slot post.response The initial response from the HTTP API
1313
#' @slot statement The SQL statement sent to the database
14+
#' @slot session.timezone Session time zone used for the connection
1415
#' @slot cursor An internal implementation detail for keeping track of
1516
#' what stage a request is in
1617
#' @keywords internal

R/copy.to.src.presto.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
# LICENSE file in the root directory of this source tree. An additional grant
66
# of patent rights can be found in the PATENTS file in the same directory.
77

8+
#' S3 implementation of \code{\link[dplyr]{copy_to}} for Presto.
9+
#'
10+
#' @rdname dplyr_function_implementations
11+
#' @keywords internal
812
#' @export
913
copy_to.src_presto <- function(dest, df) {
1014
stop("Not implemented.")

R/db.data.type.PrestoConnection.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
# LICENSE file in the root directory of this source tree. An additional grant
66
# of patent rights can be found in the PATENTS file in the same directory.
77

8+
#' S3 implementation of \code{\link[dplyr]{db_data_type}} for Presto.
9+
#'
10+
#' @rdname dplyr_function_implementations
11+
#' @keywords internal
812
#' @export
913
db_data_type.PrestoConnection <- function(con, fields, ...) {
1014
return(sapply(fields, function(field) dbDataType(Presto(), field)))

R/db.explain.PrestoConnection.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
# LICENSE file in the root directory of this source tree. An additional grant
66
# of patent rights can be found in the PATENTS file in the same directory.
77

8+
#' S3 implementation of \code{\link[dplyr]{db_explain}} for Presto.
9+
#'
10+
#' @rdname dplyr_function_implementations
11+
#' @keywords internal
812
#' @export
913
db_explain.PrestoConnection <- function(con, sql, ...) {
1014
explain.sql <- dplyr::build_sql("EXPLAIN ", sql)

0 commit comments

Comments
 (0)