Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R Client 2.0 - Table Ops #4240

Merged
merged 115 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
63e1507
Delete outdated testing files
alexpeters1208 Jun 28, 2023
5478a4b
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Jun 28, 2023
4e4e6d1
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Jun 28, 2023
25f7e3b
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Jun 29, 2023
46ce7f4
Continue api expansion
alexpeters1208 Jun 29, 2023
805c83f
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Jul 3, 2023
121d3fb
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Jul 6, 2023
28f87a2
More api stuff
alexpeters1208 Jul 6, 2023
baaef8d
Merge remote-tracking branch 'origin/api-expansion' into api-expansion
alexpeters1208 Jul 6, 2023
e89b8b9
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Jul 10, 2023
c752a14
Continue API expansion
alexpeters1208 Jul 10, 2023
516b651
Merge remote-tracking branch 'origin/api-expansion' into api-expansion
alexpeters1208 Jul 10, 2023
b2652a5
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Jul 12, 2023
d5eef1a
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Jul 13, 2023
acf9aed
Document new methods, start unit testing file. Roxygen not called yet
alexpeters1208 Jul 13, 2023
1c75e40
Merge remote-tracking branch 'origin/api-expansion' into api-expansion
alexpeters1208 Jul 13, 2023
1d32d05
Rearrange methods, change gitignore, generate roxygen
alexpeters1208 Jul 13, 2023
c6d6a27
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Jul 14, 2023
6d02151
Continue API expansion, do not expose all package functions to user
alexpeters1208 Jul 18, 2023
daf88ec
Merge remote-tracking branch 'origin/api-expansion' into api-expansion
alexpeters1208 Jul 18, 2023
8f4dc93
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Jul 18, 2023
75ef045
Get rid of experimenting that should not have been committed
alexpeters1208 Jul 18, 2023
86cb58e
Clean up R wrapping, implement agg_by, configure NAMESPACE to only ex…
alexpeters1208 Jul 19, 2023
c131045
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Jul 19, 2023
e7fcb8c
Refactor type conversion logic, R-level type checking, actually add N…
alexpeters1208 Jul 19, 2023
e0ba56f
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Jul 19, 2023
ec5339e
Fix helper functions, add Aggregation to NAMESPACE
alexpeters1208 Jul 19, 2023
b7b2d9f
Merge remote-tracking branch 'origin/api-expansion' into api-expansion
alexpeters1208 Jul 19, 2023
3353842
Fix error handling, move unit tests to install automatically
alexpeters1208 Jul 20, 2023
1da5870
Update README to simplify install command in light of automatic test …
alexpeters1208 Jul 20, 2023
55bc030
Add Sorter class to make tableHandle.sort() work, change functions to…
alexpeters1208 Jul 20, 2023
fa1beb9
Merge remote-tracking branch 'origin/api-expansion' into api-expansion
alexpeters1208 Jul 20, 2023
57ed26c
More unit tests
alexpeters1208 Jul 21, 2023
4689f94
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Jul 21, 2023
bb997a6
Overhaul table ops API for Dplyr feel
alexpeters1208 Jul 24, 2023
07a5c87
More unit tests
alexpeters1208 Jul 25, 2023
1884d5c
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Jul 25, 2023
8c0eb92
Simplify sorting API, more unit tests
alexpeters1208 Jul 25, 2023
09b2f83
Reorder table operations logically, connect ClientWrapper to newly ex…
alexpeters1208 Jul 25, 2023
d33966c
Fix new table methods, add tests, add conversion functions to be used…
alexpeters1208 Jul 25, 2023
e7bf936
Update generics
alexpeters1208 Jul 25, 2023
a3c8d6e
Reorder agg_by ops, start agg_by testing
alexpeters1208 Jul 26, 2023
1a77370
enable empty _by and agg ops
alexpeters1208 Jul 26, 2023
db78418
agg_by testing
alexpeters1208 Jul 26, 2023
65d9e70
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Jul 26, 2023
da79c54
Finish agg_by testing
alexpeters1208 Jul 27, 2023
6e2a3d4
Merge remote-tracking branch 'origin/api-expansion' into api-expansion
alexpeters1208 Jul 27, 2023
d131aa7
Add table ops documentation, not hooked into R yet
alexpeters1208 Jul 27, 2023
36b757b
Fix unit tests after renames
alexpeters1208 Jul 27, 2023
3f916df
More unit tests
alexpeters1208 Jul 27, 2023
3417911
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Jul 27, 2023
0b5ec03
Even more unit tests
alexpeters1208 Jul 27, 2023
0a33c87
Merge remote-tracking branch 'origin/api-expansion' into api-expansion
alexpeters1208 Jul 27, 2023
f022001
Naming consistency in table operations
alexpeters1208 Jul 27, 2023
b158086
Group_by and ungroup tests
alexpeters1208 Jul 27, 2023
638486b
empty_table and time_table tests
alexpeters1208 Jul 28, 2023
d377f82
Join unit tests
alexpeters1208 Jul 28, 2023
ea1fb3b
Add close method
alexpeters1208 Jul 28, 2023
3725496
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Jul 28, 2023
7e70094
Apply Tidyverse style guide
alexpeters1208 Jul 28, 2023
f89e9f7
Merge remote-tracking branch 'origin/api-expansion' into api-expansion
alexpeters1208 Jul 28, 2023
f781006
Fix rbind implementation
alexpeters1208 Jul 31, 2023
008ac44
Update DESCRIPTION w/ version
alexpeters1208 Jul 31, 2023
4b1e7f3
Merge branch 'main' into api-expansion
alexpeters1208 Jul 31, 2023
ea63467
Merge remote-tracking branch 'origin/main' into api-expansion with me…
alexpeters1208 Jul 31, 2023
19008f4
Fix problems from merge conflict
alexpeters1208 Jul 31, 2023
d29e6bb
Refactor helper functions
alexpeters1208 Aug 2, 2023
546662f
Correction to helper function refactor
alexpeters1208 Aug 2, 2023
cd41a82
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Aug 2, 2023
3dfb4f5
Add new clientOptionsWrapper in S4. Does not support piping
alexpeters1208 Aug 2, 2023
3b0d89d
More rewrite
alexpeters1208 Aug 3, 2023
8033299
Working unit tests, refactor complete
alexpeters1208 Aug 4, 2023
5203a1a
Apply code review comments
alexpeters1208 Aug 5, 2023
4f09a71
Implement merge
alexpeters1208 Aug 7, 2023
826aaa5
Code review change
alexpeters1208 Aug 7, 2023
e2dde0c
Cpp formatting
alexpeters1208 Aug 7, 2023
433e787
Test base pipe
alexpeters1208 Aug 8, 2023
e064c8a
Merge pull request #5 from alexpeters1208/s4-rewrite
alexpeters1208 Aug 8, 2023
094abe3
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Aug 8, 2023
6e06ea9
Code review suggestions
alexpeters1208 Aug 8, 2023
d42b76f
Refactor import_table to as_dh_table with generics
alexpeters1208 Aug 9, 2023
e616c51
Merge pull request #6 from alexpeters1208/s4-rewrite
alexpeters1208 Aug 9, 2023
06d7bec
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Aug 9, 2023
78bbe24
Applying more code review
alexpeters1208 Aug 9, 2023
a7bef48
Applying even more code review
alexpeters1208 Aug 9, 2023
c5bd9d6
Merge branch 'deephaven:main' into s4-rewrite
alexpeters1208 Aug 9, 2023
90c2839
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Aug 9, 2023
95d4ad4
Merge pull request #7 from alexpeters1208/s4-rewrite
alexpeters1208 Aug 9, 2023
45eab42
Update cpp to conform to new styleguide, need to uncomment pct when c…
alexpeters1208 Aug 9, 2023
b41a35d
Merge branch 'main' into api-expansion
alexpeters1208 Aug 9, 2023
4fe135f
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Aug 9, 2023
74e5e48
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Aug 11, 2023
7f5ade2
Uncomment pct, all tests pass
alexpeters1208 Aug 11, 2023
f10d0f3
Merge remote-tracking branch 'origin/api-expansion' into api-expansion
alexpeters1208 Aug 11, 2023
37c301d
Refactor auth API to conform to Python
alexpeters1208 Aug 11, 2023
ed616af
Support multiple int/string options and extra headers
alexpeters1208 Aug 11, 2023
f7797fb
Code review to helper functions
alexpeters1208 Aug 11, 2023
8282d38
Rename connect to dhConnect
alexpeters1208 Aug 11, 2023
1214955
Update NAMESPACE, add warnings, apply styleguide
alexpeters1208 Aug 11, 2023
14a9b11
Enable size 0 empty_table
alexpeters1208 Aug 11, 2023
9aa73fe
Assert options inputs
alexpeters1208 Aug 11, 2023
ebde48d
Merge branch 'deephaven:main' into api-expansion
alexpeters1208 Aug 14, 2023
45bbe5d
Starting client_wrapper docs
alexpeters1208 Aug 14, 2023
38b3496
Support ncol() and dim()
alexpeters1208 Aug 14, 2023
3bdb485
Merge remote-tracking branch 'origin/api-expansion' into api-expansion
alexpeters1208 Aug 14, 2023
1a0df88
Get rid of mistakenly committed docs, add list type verification in m…
alexpeters1208 Aug 14, 2023
ded6524
Code review suggestions
alexpeters1208 Aug 14, 2023
a7ea30d
Verified that exact_join is an analog of left_join
alexpeters1208 Aug 14, 2023
7b0cfb3
Expand sort API, constrain merge args, add username and password to d…
alexpeters1208 Aug 14, 2023
d4e7686
Apply code review
alexpeters1208 Aug 15, 2023
79fb2a4
Kill merge, make merge_tables
alexpeters1208 Aug 15, 2023
e8eb704
Update version
alexpeters1208 Aug 15, 2023
c782b60
Change to abs_sort
alexpeters1208 Aug 15, 2023
f88237c
Support merge_tables(NULL)
alexpeters1208 Aug 15, 2023
794ef84
Change push_to_table to import_table
alexpeters1208 Aug 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion R/rdeephaven/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ lib/cpp-client/
lib/cpp-examples/
lib/cpp-dependencies/local
lib/cpp-dependencies/src
lib/cpp-dependencies/env.sh
lib/cpp-dependencies/env.sh
*.o
*.so
4 changes: 2 additions & 2 deletions R/rdeephaven/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: rdeephaven
Type: Package
Title: R Client for Deephaven Core
Version: 1.0
Version: 0.27.1
Date: 2023-05-12
Author: Deephaven Data Labs
Maintainer: Alex Peters <alexpeters@deephaven.io>
Expand All @@ -13,7 +13,7 @@ Description: The `rdeephaven` package provides an R API for communicating with t
and bind it to a server-side variable so you can access it from any Deephaven client. Finally, you can run Python or Groovy
scripts on the Deephaven server, so long as your server is equipped with that capability.
License: Apache License (== 2.0)
Depends: R (> 4.1.2), Rcpp (>= 1.0.10), arrow (>= 12.0.0), R6 (>= 2.5.0), dplyr (>= 1.1.0)
Depends: R (> 4.1.2), Rcpp (>= 1.0.10), arrow (>= 12.0.0), dplyr (>= 1.1.0)
Imports: Rcpp (>= 1.0.10), arrow (>= 12.0.0), R6 (>= 2.5.0), dplyr (>= 1.1.0)
LinkingTo: Rcpp
Suggests: testthat (>= 3.0.0)
Expand Down
82 changes: 79 additions & 3 deletions R/rdeephaven/NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,3 +1,79 @@
useDynLib(rdeephaven, .registration=TRUE)
importFrom(Rcpp, evalCpp)
exportPattern("^[[:alpha:]]+")
# Generated by roxygen2: do not edit by hand

export(agg_abs_sum)
export(agg_avg)
export(agg_count)
export(agg_first)
export(agg_last)
export(agg_max)
export(agg_median)
export(agg_min)
export(agg_percentile)
export(agg_std)
export(agg_sum)
export(agg_var)
export(agg_w_avg)
export(merge_tables)
export(sort)
exportClasses(Aggregation)
exportClasses(Client)
exportClasses(TableHandle)
exportMethods(abs_sum_by)
exportMethods(agg_by)
exportMethods(as.data.frame)
exportMethods(as_arrow_table)
exportMethods(as_data_frame)
exportMethods(as_record_batch_reader)
exportMethods(as_tibble)
exportMethods(avg_by)
exportMethods(bind_to_variable)
exportMethods(close)
exportMethods(count_by)
exportMethods(cross_join)
exportMethods(dhConnect)
exportMethods(dim)
exportMethods(drop_columns)
exportMethods(empty_table)
exportMethods(exact_join)
exportMethods(first_by)
exportMethods(group_by)
exportMethods(head)
exportMethods(head_by)
exportMethods(is_static)
exportMethods(last_by)
exportMethods(max_by)
exportMethods(median_by)
exportMethods(min_by)
exportMethods(natural_join)
exportMethods(ncol)
exportMethods(nrow)
exportMethods(open_table)
exportMethods(percentile_by)
exportMethods(import_table)
exportMethods(run_script)
exportMethods(select)
exportMethods(sort)
exportMethods(std_by)
exportMethods(sum_by)
exportMethods(tail)
exportMethods(tail_by)
exportMethods(time_table)
exportMethods(ungroup)
exportMethods(update)
exportMethods(update_view)
exportMethods(var_by)
exportMethods(view)
exportMethods(w_avg_by)
exportMethods(where)
import(Rcpp)
importFrom(Rcpp,evalCpp)
importFrom(arrow,RecordBatchReader)
importFrom(arrow,RecordBatchStreamReader)
importFrom(arrow,Table)
importFrom(arrow,arrow_table)
importFrom(arrow,as_arrow_table)
importFrom(arrow,as_record_batch_reader)
importFrom(dplyr,as_data_frame)
importFrom(dplyr,as_tibble)
importFrom(magrittr,"%>%")
useDynLib(rdeephaven, .registration = TRUE)
89 changes: 89 additions & 0 deletions R/rdeephaven/R/aggregate_wrapper.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#' @export
setClass(
"Aggregation",
representation(
.internal_rcpp_object = "Rcpp_INTERNAL_Aggregate"
)
)

### All of the functions below return an instance of the above class

#' @export
agg_first <- function(cols = character()) {
verify_string("cols", cols, FALSE)
return(new("Aggregation", .internal_rcpp_object = INTERNAL_agg_first(cols)))
}

#' @export
agg_last <- function(cols = character()) {
verify_string("cols", cols, FALSE)
return(new("Aggregation", .internal_rcpp_object = INTERNAL_agg_last(cols)))
}

#' @export
agg_min <- function(cols = character()) {
verify_string("cols", cols, FALSE)
return(new("Aggregation", .internal_rcpp_object = INTERNAL_agg_min(cols)))
}

#' @export
agg_max <- function(cols = character()) {
verify_string("cols", cols, FALSE)
return(new("Aggregation", .internal_rcpp_object = INTERNAL_agg_max(cols)))
}

#' @export
agg_sum <- function(cols = character()) {
verify_string("cols", cols, FALSE)
return(new("Aggregation", .internal_rcpp_object = INTERNAL_agg_sum(cols)))
}

#' @export
agg_abs_sum <- function(cols = character()) {
verify_string("cols", cols, FALSE)
return(new("Aggregation", .internal_rcpp_object = INTERNAL_agg_abs_sum(cols)))
}

#' @export
agg_avg <- function(cols = character()) {
verify_string("cols", cols, FALSE)
return(new("Aggregation", .internal_rcpp_object = INTERNAL_agg_avg(cols)))
}

#' @export
agg_w_avg <- function(wcol, cols = character()) {
verify_string("wcol", wcol, TRUE)
verify_string("cols", cols, FALSE)
return(new("Aggregation", .internal_rcpp_object = INTERNAL_agg_w_avg(wcol, cols)))
}

#' @export
agg_median <- function(cols = character()) {
verify_string("cols", cols, FALSE)
return(new("Aggregation", .internal_rcpp_object = INTERNAL_agg_median(cols)))
}

#' @export
agg_var <- function(cols = character()) {
verify_string("cols", cols, FALSE)
return(new("Aggregation", .internal_rcpp_object = INTERNAL_agg_var(cols)))
}

#' @export
agg_std <- function(cols = character()) {
verify_string("cols", cols, FALSE)
return(new("Aggregation", .internal_rcpp_object = INTERNAL_agg_std(cols)))
}

#' @export
agg_percentile <- function(percentile, cols = character()) {
verify_in_unit_interval("percentile", percentile, TRUE)
verify_string("cols", cols, FALSE)
return(new("Aggregation", .internal_rcpp_object = INTERNAL_agg_percentile(percentile, cols)))
}

#' @export
agg_count <- function(col) {
verify_string("col", col, TRUE)
return(new("Aggregation", .internal_rcpp_object = INTERNAL_agg_count(col)))
}
117 changes: 0 additions & 117 deletions R/rdeephaven/R/client_options_wrapper.R

This file was deleted.

Loading