From 1d5bab26b1b8e5dbfc541108caf53c49c4e1b722 Mon Sep 17 00:00:00 2001 From: John Mount Date: Mon, 18 Jun 2018 11:04:06 -0700 Subject: [PATCH] clean and re-build --- DESCRIPTION | 12 +- NEWS.md | 2 +- R/join_controller.R | 1 - README.md | 14 +- docs/articles/AssigmentPartitioner.html | 6 +- docs/articles/PipeableSQL.html | 20 +- docs/articles/QueryGeneration.html | 18 +- docs/articles/index.html | 5 +- docs/articles/rquery_intro.html | 28 +-- docs/authors.html | 5 +- docs/docsearch.css | 31 +-- docs/docsearch.js | 85 +++++++ docs/index.html | 28 +-- docs/news/index.html | 11 +- docs/pkgdown.css | 5 + docs/pkgdown.js | 232 +++++++----------- docs/pkgdown.yml | 2 +- docs/reference/actualize_join_plan.html | 8 +- docs/reference/apply_right.relop.html | 5 +- docs/reference/assign_slice.html | 11 +- docs/reference/build_join_plan.html | 5 +- docs/reference/column_names.html | 5 +- docs/reference/columns_used.html | 5 +- docs/reference/commencify.html | 5 +- docs/reference/complete_design.html | 5 +- docs/reference/count_null_cols.html | 5 +- docs/reference/db_td.html | 5 +- docs/reference/dbi_colnames.html | 5 +- docs/reference/dbi_coltypes.html | 5 +- docs/reference/dbi_connection_advice.html | 5 +- docs/reference/dbi_connection_name.html | 5 +- docs/reference/dbi_connection_tests.html | 5 +- docs/reference/dbi_copy_to.html | 5 +- docs/reference/dbi_nrow.html | 5 +- docs/reference/dbi_remove_table.html | 5 +- docs/reference/dbi_table_exists.html | 5 +- docs/reference/describe_tables.html | 5 +- docs/reference/doubleapply.html | 7 +- docs/reference/drop_columns.html | 5 +- docs/reference/example_employee_date.html | 5 +- docs/reference/execute.html | 5 +- docs/reference/expand_grid.html | 5 +- docs/reference/extend_nse.html | 5 +- docs/reference/extend_se.html | 5 +- docs/reference/format_node.html | 5 +- docs/reference/getDBOption.html | 7 +- docs/reference/graph_join_plan.html | 5 +- docs/reference/if_else_block.html | 11 +- docs/reference/if_else_op.html | 5 +- docs/reference/index.html | 184 +++++++------- docs/reference/inspect_join_plan.html | 5 +- docs/reference/key_inspector_all_cols.html | 5 +- docs/reference/key_inspector_postgresql.html | 5 +- docs/reference/key_inspector_sqlite.html | 5 +- docs/reference/local_td.html | 5 +- docs/reference/map_column_values.html | 5 +- docs/reference/mark_null_cols.html | 5 +- docs/reference/materialize.html | 5 +- docs/reference/materialize_node.html | 5 +- docs/reference/materialize_sql.html | 5 +- docs/reference/mk_td.html | 5 +- docs/reference/natural_join.html | 7 +- docs/reference/non_sql_node.html | 5 +- docs/reference/normalize_cols.html | 5 +- docs/reference/null_replace.html | 5 +- docs/reference/op_diagram.html | 5 +- docs/reference/orderby.html | 5 +- docs/reference/pick_top_k.html | 5 +- docs/reference/project_nse.html | 5 +- docs/reference/project_se.html | 5 +- docs/reference/quantile_cols.html | 5 +- docs/reference/quantile_node.html | 5 +- docs/reference/quote_identifier.html | 5 +- docs/reference/quote_literal.html | 5 +- docs/reference/quote_string.html | 5 +- docs/reference/reexports.html | 7 +- docs/reference/rename_columns.html | 5 +- docs/reference/rq_colnames.html | 5 +- docs/reference/rq_coltypes.html | 5 +- docs/reference/rq_connection_advice.html | 5 +- docs/reference/rq_connection_name.html | 5 +- docs/reference/rq_connection_tests.html | 5 +- docs/reference/rq_copy_to.html | 5 +- docs/reference/rq_execute.html | 5 +- docs/reference/rq_get_query.html | 5 +- docs/reference/rq_nrow.html | 5 +- docs/reference/rq_remove_table.html | 5 +- docs/reference/rq_table_exists.html | 5 +- docs/reference/rquery.html | 5 +- .../reference/rquery_apply_to_data_frame.html | 5 +- docs/reference/rquery_db_info.html | 5 +- docs/reference/rsummary.html | 5 +- docs/reference/rsummary_node.html | 9 +- docs/reference/select_columns.html | 5 +- docs/reference/select_rows_nse.html | 5 +- docs/reference/select_rows_se.html | 5 +- docs/reference/setDBOption.html | 5 +- docs/reference/set_indicator.html | 5 +- docs/reference/sql_expr_set.html | 5 +- docs/reference/sql_node.html | 5 +- docs/reference/tables_used.html | 5 +- docs/reference/theta_join_nse.html | 5 +- docs/reference/theta_join_se.html | 5 +- docs/reference/to_sql.html | 5 +- docs/reference/tokenize_for_SQL.html | 20 +- docs/reference/topo_sort_tables-1.png | Bin 59731 -> 56789 bytes docs/reference/topo_sort_tables.html | 5 +- docs/reference/unionall.html | 5 +- 108 files changed, 747 insertions(+), 429 deletions(-) create mode 100644 docs/docsearch.js diff --git a/DESCRIPTION b/DESCRIPTION index 05ff8dd7..99b828ca 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,25 +2,23 @@ Package: rquery Type: Package Title: Relational Query Generator for Data Manipulation at Scale Version: 0.5.0 -Date: 2018-06-16 +Date: 2018-06-18 Authors@R: c( person("John", "Mount", email = "jmount@win-vector.com", role = c("aut", "cre")), person(family = "Win-Vector LLC", role = c("cph")) ) Maintainer: John Mount URL: https://github.com/WinVector/rquery/, https://winvector.github.io/rquery/ -Description: A 'SQL' piped query generator based on Edgar F. Codd's relational +Description: A piped query generator based on Edgar F. Codd's relational algebra, and on production experience using 'SQL' and 'dplyr' at big data scale. The design represents an attempt to make 'SQL' more teachable by denoting composition by a sequential pipeline notation instead of nested queries or functions. The implementation delivers reliable high - performance data processing on large data systems such as `Spark` - and databases. Package features include: data processing trees + performance data processing on large data systems such as 'Spark', + databases, and 'data.table'. Package features include: data processing trees or pipelines as observable objects (able to report both columns produced and columns used), optimized 'SQL' generation as an explicit - user visible modeling step, explicit query reasoning and checking, - and convenience methods for applying query - trees to in-memory 'data.frame's. + user visible modeling step, explicit query reasoning and checking. License: GPL-3 Encoding: UTF-8 Depends: diff --git a/NEWS.md b/NEWS.md index e7acfde7..ebf9a130 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,5 @@ -# rquery 0.5.0 2018/06/16 +# rquery 0.5.0 2018/06/18 * Make DBI suggested. * Rename dbi_ prefixes to rq_ (for now have aliases from old to new). diff --git a/R/join_controller.R b/R/join_controller.R index caa41028..e9dfba4d 100644 --- a/R/join_controller.R +++ b/R/join_controller.R @@ -846,7 +846,6 @@ strMapToString <- function(m) { #' Please see \code{vignette('DependencySorting', package = 'rquery')} and \code{vignette('joinController', package= 'rquery')} for more details. #' @seealso \code{\link{describe_tables}}, \code{\link{build_join_plan}}, \code{\link{inspect_join_plan}}, \code{\link{graph_join_plan}} #' -#' TODO: parameterize the implementation provider (right now hard-coded for \code{dplr}, but at least also direct \code{SQL} is a good extension). #' #' @param columnJoinPlan columns to join, from \code{\link{build_join_plan}} (and likely altered by user). Note: no column names must intersect with names of the form \code{table_CLEANEDTABNAME_present}. #' @param ... force later arguments to bind by name. diff --git a/README.md b/README.md index 807a4caf..102182aa 100644 --- a/README.md +++ b/README.md @@ -272,14 +272,14 @@ cat(to_sql(dq, my_db, source_limit = 1000)) "d"."assessmentTotal" FROM "d" LIMIT 1000 - ) tsql_31919852763810022163_0000000000 - ) tsql_31919852763810022163_0000000001 - ) tsql_31919852763810022163_0000000002 - ) tsql_31919852763810022163_0000000003 + ) tsql_10147663132732343566_0000000000 + ) tsql_10147663132732343566_0000000001 + ) tsql_10147663132732343566_0000000002 + ) tsql_10147663132732343566_0000000003 WHERE "row_number" <= 1 - ) tsql_31919852763810022163_0000000004 - ) tsql_31919852763810022163_0000000005 - ) tsql_31919852763810022163_0000000006 ORDER BY "subjectID" + ) tsql_10147663132732343566_0000000004 + ) tsql_10147663132732343566_0000000005 + ) tsql_10147663132732343566_0000000006 ORDER BY "subjectID" The query is large, but due to its regular structure it should be very amenable to query optimization. diff --git a/docs/articles/AssigmentPartitioner.html b/docs/articles/AssigmentPartitioner.html index 8afee387..84ac7b2e 100644 --- a/docs/articles/AssigmentPartitioner.html +++ b/docs/articles/AssigmentPartitioner.html @@ -8,8 +8,8 @@ Assignment Partitioner • rquery - - + + - - + + - - + + + + + - @@ -31,6 +33,7 @@ + diff --git a/docs/articles/rquery_intro.html b/docs/articles/rquery_intro.html index a6e2d589..1a2b07b4 100644 --- a/docs/articles/rquery_intro.html +++ b/docs/articles/rquery_intro.html @@ -8,8 +8,8 @@ rquery Introduction • rquery - - + + + + + - @@ -31,6 +33,7 @@ + diff --git a/docs/docsearch.css b/docs/docsearch.css index c524034b..e5f1fe1d 100644 --- a/docs/docsearch.css +++ b/docs/docsearch.css @@ -111,23 +111,26 @@ } .algolia-autocomplete .algolia-docsearch-footer { - float: none; - width: auto; - height: auto; - padding: .75rem 1rem 0; - font-size: .95rem; - line-height: 1; - color: #767676; - background-color: rgb(255, 255, 255); - border-top: 1px solid rgba(0, 0, 0, .1) + width: 110px; + height: 20px; + z-index: 3; + margin-top: 10.66667px; + float: right; + font-size: 0; + line-height: 0; } .algolia-autocomplete .algolia-docsearch-footer--logo { - display: inline; - overflow: visible; - color: inherit; - text-indent: 0; - background: 0 0 + background-image: url("data:image/svg+xml;utf8,"); + background-repeat: no-repeat; + background-position: 50%; + background-size: 100%; + overflow: hidden; + text-indent: -9000px; + width: 100%; + height: 100%; + display: block; + transform: translate(-8px); } .algolia-autocomplete .algolia-docsearch-suggestion--highlight { diff --git a/docs/docsearch.js b/docs/docsearch.js new file mode 100644 index 00000000..b35504cd --- /dev/null +++ b/docs/docsearch.js @@ -0,0 +1,85 @@ +$(function() { + + // register a handler to move the focus to the search bar + // upon pressing shift + "/" (i.e. "?") + $(document).on('keydown', function(e) { + if (e.shiftKey && e.keyCode == 191) { + e.preventDefault(); + $("#search-input").focus(); + } + }); + + $(document).ready(function() { + // do keyword highlighting + /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ + var mark = function() { + + var referrer = document.URL ; + var paramKey = "q" ; + + if (referrer.indexOf("?") !== -1) { + var qs = referrer.substr(referrer.indexOf('?') + 1); + var qs_noanchor = qs.split('#')[0]; + var qsa = qs_noanchor.split('&'); + var keyword = ""; + + for (var i = 0; i < qsa.length; i++) { + var currentParam = qsa[i].split('='); + + if (currentParam.length !== 2) { + continue; + } + + if (currentParam[0] == paramKey) { + keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); + } + } + + if (keyword !== "") { + $(".contents").unmark({ + done: function() { + $(".contents").mark(keyword); + } + }); + } + } + }; + + mark(); + }); +}); + +/* Search term highlighting ------------------------------*/ + +function matchedWords(hit) { + var words = []; + + var hierarchy = hit._highlightResult.hierarchy; + // loop to fetch from lvl0, lvl1, etc. + for (var idx in hierarchy) { + words = words.concat(hierarchy[idx].matchedWords); + } + + var content = hit._highlightResult.content; + if (content) { + words = words.concat(content.matchedWords); + } + + // return unique words + var words_uniq = [...new Set(words)]; + return words_uniq; +} + +function updateHitURL(hit) { + + var words = matchedWords(hit); + var url = ""; + + if (hit.anchor) { + url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; + } else { + url = hit.url + '?q=' + escape(words.join(" ")); + } + + return url; +} diff --git a/docs/index.html b/docs/index.html index 921df4f5..5f44a1fc 100644 --- a/docs/index.html +++ b/docs/index.html @@ -8,20 +8,18 @@ Relational Query Generator for Data Manipulation at Scale • rquery - - - + + + user visible modeling step, explicit query reasoning and checking."> + + + - @@ -31,6 +33,7 @@ + @@ -116,9 +119,9 @@

Changelog

Source: NEWS.md -
+

-rquery 0.5.0 2018/06/16 Unreleased +rquery 0.5.0 2018/06/18 Unreleased

  • Make DBI suggested.
  • @@ -250,7 +253,7 @@

    Contents

    +#> r1 r2 +#> 1 4357803990409006030 -864650465890084370 +#> 2 -3556453966411332092 4879982744923270807

#> [1] TRUE
+}
#> NULL
+#> r1 r2 +#> 1 -193850873159778773 -217259055736936512 +#> 2 8790866377796682081 2100541333978422113