From d70504984fce2660291555f966ecae7692139a23 Mon Sep 17 00:00:00 2001 From: John Mount Date: Tue, 7 Jan 2020 08:08:34 -0800 Subject: [PATCH] rebuild and recheck --- DESCRIPTION | 2 +- NEWS.md | 2 +- cran-comments.md | 37 ++++++++++--------- docs/articles/AssigmentPartitioner.html | 4 +- docs/articles/Parameterized_rquery.html | 10 ++--- docs/articles/PipeableSQL.html | 26 ++++++------- docs/articles/QueryGeneration.html | 14 +++---- docs/articles/R_mapping.html | 16 ++++---- docs/articles/rquery_intro.html | 28 +++++++------- docs/articles/rquery_many_columns.html | 8 ++-- docs/articles/rquery_substitution.html | 22 +++++------ docs/articles/sql_quoting.html | 18 ++++----- docs/index.html | 4 +- docs/news/index.html | 6 +-- docs/reference/actualize_join_plan.html | 2 +- docs/reference/affine_transform.html | 2 +- docs/reference/apply_right.relop.html | 4 +- docs/reference/assign_slice.html | 2 +- docs/reference/build_join_plan.html | 2 +- docs/reference/column_names.html | 2 +- docs/reference/columns_used.html | 2 +- docs/reference/commencify.html | 2 +- docs/reference/complete_design.html | 2 +- docs/reference/count_null_cols.html | 4 +- docs/reference/db_td.html | 2 +- docs/reference/describe_tables.html | 2 +- docs/reference/drop_columns.html | 2 +- docs/reference/example_employee_date.html | 2 +- docs/reference/execute.html | 2 +- docs/reference/expand_grid.html | 2 +- docs/reference/extend.html | 2 +- docs/reference/extend_se.html | 2 +- docs/reference/getDBOption.html | 2 +- docs/reference/graph_join_plan.html | 4 +- docs/reference/if_else_block.html | 8 ++-- docs/reference/if_else_op.html | 2 +- docs/reference/inspect_join_plan.html | 2 +- docs/reference/key_inspector_all_cols.html | 2 +- docs/reference/key_inspector_sqlite.html | 2 +- docs/reference/lookup_by_column.html | 4 +- docs/reference/map_column_values.html | 2 +- docs/reference/mark_null_cols.html | 4 +- docs/reference/materialize.html | 2 +- docs/reference/materialize_sql.html | 2 +- docs/reference/mk_td.html | 2 +- docs/reference/natural_join.html | 2 +- docs/reference/null_replace.html | 2 +- docs/reference/order_expr.html | 2 +- docs/reference/order_expr_se.html | 2 +- docs/reference/order_rows.html | 2 +- docs/reference/orderby.html | 2 +- docs/reference/project.html | 2 +- docs/reference/project_se.html | 2 +- docs/reference/rename_columns.html | 2 +- docs/reference/rq_coltypes.html | 2 +- docs/reference/rq_connection_advice.html | 2 +- docs/reference/rq_connection_name.html | 2 +- docs/reference/rq_connection_tests.html | 2 +- docs/reference/rq_copy_to.html | 2 +- .../reference/rquery_apply_to_data_frame.html | 4 +- docs/reference/rstr.html | 2 +- docs/reference/rsummary.html | 4 +- docs/reference/rsummary_node.html | 4 +- docs/reference/select_columns.html | 2 +- docs/reference/select_rows.html | 2 +- docs/reference/select_rows_se.html | 2 +- docs/reference/set_indicator.html | 2 +- docs/reference/sql_expr_set.html | 4 +- docs/reference/sql_node.html | 2 +- docs/reference/tables_used.html | 2 +- docs/reference/theta_join.html | 2 +- docs/reference/theta_join_se.html | 2 +- docs/reference/to_sql.html | 2 +- docs/reference/topo_sort_tables.html | 4 +- docs/reference/unionall.html | 2 +- extras/check_reverse_dependencies.md | 14 +++---- 76 files changed, 181 insertions(+), 178 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 9bb9a261..22a7f0b1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: rquery Type: Package Title: Relational Query Generator for Data Manipulation at Scale Version: 1.4.1 -Date: 2019-12-31 +Date: 2020-01-07 Authors@R: c( person("John", "Mount", email = "jmount@win-vector.com", role = c("aut", "cre")), person(family = "Win-Vector LLC", role = c("cph")) diff --git a/NEWS.md b/NEWS.md index 44073fcc..d06668fc 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,5 @@ -# rquery 1.4.1 2019/12/31 +# rquery 1.4.1 2020/01/07 * Add many values vignette. * Move to non-strict arrows. diff --git a/cran-comments.md b/cran-comments.md index 3a09e248..a40f6cdf 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -5,7 +5,7 @@ ### OSX (local machine using --as-cran from the command line) R CMD check --as-cran rquery_1.4.1.tar.gz - * using R version 3.5.0 (2018-04-23) + * using R version 3.6.0 (2019-04-26) * using platform: x86_64-apple-darwin15.6.0 (64-bit) * using session charset: UTF-8 * using option ‘--as-cran’ @@ -17,24 +17,27 @@ Maintainer: ‘John Mount ’ Status: OK - Same check run to same results with: - - * export _R_CHECK_DEPENDS_ONLY=true - * export _R_CHECK_SUGGESTS_ONLY=true - ### Windows - devtools::check_win_devel() - * using R Under development (unstable) (2019-12-20 r77608) - * using platform: x86_64-w64-mingw32 (64-bit) - * using session charset: ISO8859-1 - * checking for file 'rquery/DESCRIPTION' ... OK - * checking extension type ... Package - * this is package 'rquery' version '1.4.1' - * package encoding: UTF-8 - * checking CRAN incoming feasibility ... Note_to_CRAN_maintainers - Maintainer: 'John Mount ' - Status: OK + rhub::check_for_cran() + 822#> setting _R_CHECK_FORCE_SUGGESTS_ to false + 823#> setting R_COMPILE_AND_INSTALL_PACKAGES to never + 824#> setting R_REMOTES_STANDALONE to true + 825#> setting R_REMOTES_NO_ERRORS_FROM_WARNINGS to true + 826#> setting _R_CHECK_FORCE_SUGGESTS_ to true + 827#> setting _R_CHECK_CRAN_INCOMING_USE_ASPELL_ to true + 828#> * using log directory 'C:/Users/USERPqidzGfXOb/rquery.Rcheck' + 829#> * using R Under development (unstable) (2019-11-08 r77393) + 830#> * using platform: x86_64-w64-mingw32 (64-bit) + 831#> * using session charset: ISO8859-1 + 832#> * using option '--as-cran' + 833#> * checking for file 'rquery/DESCRIPTION' ... OK + 834#> * checking extension type ... Package + 835#> * this is package 'rquery' version '1.4.1' + 836#> * package encoding: UTF-8 + 837#> * checking CRAN incoming feasibility ... Note_to_CRAN_maintainers + 838#> Maintainer: 'John Mount ' + 894#> Status: OK ## Reverse dependencies diff --git a/docs/articles/AssigmentPartitioner.html b/docs/articles/AssigmentPartitioner.html index 38be7ba0..70a06ff6 100644 --- a/docs/articles/AssigmentPartitioner.html +++ b/docs/articles/AssigmentPartitioner.html @@ -109,7 +109,7 @@

Assignment Partitioner

John Mount, Win-Vector LLC

-

2019-12-31

+

2020-01-07

Source: vignettes/AssigmentPartitioner.Rmd @@ -132,7 +132,7 @@

2019-12-31

for(group in c('a', 'b', 'c', 'd', 'e')) { d[[paste0("rand_", group)]] <- runif(nrow(d)) } -my_db <- DBI::dbConnect(RSQLite::SQLite(), +my_db <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") d1 <- rq_copy_to(my_db, "example_table", d) d1 %.>% diff --git a/docs/articles/Parameterized_rquery.html b/docs/articles/Parameterized_rquery.html index 2c71cad4..b42e29b8 100644 --- a/docs/articles/Parameterized_rquery.html +++ b/docs/articles/Parameterized_rquery.html @@ -109,7 +109,7 @@

Parameterized rquery

John Mount, Win-Vector LLC

-

2019-12-31

+

2020-01-07

Source: vignettes/Parameterized_rquery.Rmd @@ -201,7 +201,7 @@

2019-12-31

The same example in a database.

# connect to a database
-raw_connection <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
+raw_connection <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
 
 # build a representation of the database connection
 dbopts <- rq_connection_tests(raw_connection)
@@ -242,11 +242,11 @@ 

2019-12-31

## `cyl` ## FROM ## `mtcars` -## ) tsql_25061554790003955612_0000000000 -## ) tsql_25061554790003955612_0000000001 +## ) tsql_77508351029192470263_0000000000 +## ) tsql_77508351029192470263_0000000001 ## GROUP BY ## `am` -## ) tsql_25061554790003955612_0000000002 ORDER BY `am`
+## ) tsql_77508351029192470263_0000000002 ORDER BY `am`
# disconnect
 DBI::dbDisconnect(raw_connection)
 rm(list = c("raw_connection", "db"))
diff --git a/docs/articles/PipeableSQL.html b/docs/articles/PipeableSQL.html index f993b87a..34812bfc 100644 --- a/docs/articles/PipeableSQL.html +++ b/docs/articles/PipeableSQL.html @@ -109,7 +109,7 @@

Pipeable SQL

John Mount

-

2019-12-31

+

2020-01-07

Source: vignettes/PipeableSQL.Rmd @@ -136,9 +136,9 @@

library("wrapr") # example database connection -db <- DBI::dbConnect(RSQLite::SQLite(), +db <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") -RSQLite::initExtension(db) +RSQLite::initExtension(db) dbopts <- rq_connection_tests(db) print(dbopts)

@@ -301,8 +301,8 @@

`v` FROM `d` - ) tsql_97555233525519602731_0000000000 -) tsql_97555233525519602731_0000000001 + ) tsql_98077054408306624245_0000000000 +) tsql_98077054408306624245_0000000001

Notice the above translations did not add identifier quotes to our use of “v” in “ABS(v)”. This is because the SQL expression is not parsed in R. If we want to identify terms as variables we can wrap them with as.name() or quote() to get the quoting (and other variable oriented features). The extra SELECT step to pull data from the inner table is used by rquery for important column narrowing steps, and can actually improve query performance.

op_tree <- d %.>%
   sql_node(., "absv" := list(list("ABS(", quote(v), ")"))) %.>%
@@ -321,8 +321,8 @@ 

`v` FROM `d` - ) tsql_49892673699731110421_0000000000 -) tsql_49892673699731110421_0000000001

+ ) tsql_51362261460938342413_0000000000 +) tsql_51362261460938342413_0000000001

The list(list()) notation is how we say in R that we have a single element list (i.e. one expression) that is built up as a list of terms. The marking notation is cumbersome, but is not needed when we move on to relation nodes, which are parsed in R and can spot identifiers without additional help.

op_tree itself is a an object with its own presentation format:

cat(format(op_tree))
@@ -448,7 +448,7 @@

## `v3` ## FROM ## `d2` -## ) tsql_60823892991064212541_0000000000 +## ) tsql_86624805374662936930_0000000000
# execute
 execute(db, op_tree_count_null)
##   v3 num_missing v1   v2
@@ -497,7 +497,7 @@ 

## `v3` ## FROM ## `d2` -## ) tsql_65845225589539709734_0000000000

+## ) tsql_01296151464898490365_0000000000
execute(db, s_tree)
##   v1   v2 v3 v1_isNA v2_isNA v3_isNA
 ## 1  1 <NA> NA       0       1       1
@@ -621,9 +621,9 @@ 

## "sales" ## FROM ## "df" -## ) tsql_09313174565759105732_0000000000 +## ) tsql_74980100446051472263_0000000000 ## WHERE "trans_date" <= str_to_date ( '2017-04-02' , '%Y-%m-%d' ) -## ) tsql_09313174565759105732_0000000001 GROUP BY cust

+## ) tsql_74980100446051472263_0000000001 GROUP BY cust

The .[]-notation is just signalling to rquery which symbols are column names (without requiring rquery to fully parse the SQL fragments). The rquery relational nodes get this sort of checking without any additional notation as they do fully parse the R expressions prior to any SQL translation.

We can combine .() and .[] for even more powerful expressions such as the following.

library("rquery")
@@ -660,9 +660,9 @@ 

## "sales" ## FROM ## "df" -## ) tsql_89632748484196338501_0000000000 +## ) tsql_38477406660210309265_0000000000 ## WHERE "trans_date" <= str_to_date ( '2017-04-02' , '%Y-%m-%d' ) -## ) tsql_89632748484196338501_0000000001 GROUP BY cust

+## ) tsql_38477406660210309265_0000000001 GROUP BY cust

diff --git a/docs/articles/QueryGeneration.html b/docs/articles/QueryGeneration.html index 5d5c0eee..a8cbea60 100644 --- a/docs/articles/QueryGeneration.html +++ b/docs/articles/QueryGeneration.html @@ -109,7 +109,7 @@

Query Generation

John Mount

-

2019-12-31

+

2020-01-07

Source: vignettes/QueryGeneration.Rmd @@ -210,13 +210,13 @@

2019-12-31

`assessmentTotal` FROM `d` LIMIT 1000 - ) tsql_47316979855883107459_0000000000 - ) tsql_47316979855883107459_0000000001 - ) tsql_47316979855883107459_0000000002 - ) tsql_47316979855883107459_0000000003 + ) tsql_66580991913024196491_0000000000 + ) tsql_66580991913024196491_0000000001 + ) tsql_66580991913024196491_0000000002 + ) tsql_66580991913024196491_0000000003 WHERE `rank` = `count` - ) tsql_47316979855883107459_0000000004 - ) tsql_47316979855883107459_0000000005 ORDER BY `subjectID` + ) tsql_66580991913024196491_0000000004 + ) tsql_66580991913024196491_0000000005 ORDER BY `subjectID`