Skip to content

Commit

Permalink
==.Table
Browse files Browse the repository at this point in the history
  • Loading branch information
romainfrancois committed Sep 27, 2019
1 parent 7f1c184 commit d318a66
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions r/NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ S3method("==",Field)
S3method("==",Message)
S3method("==",RecordBatch)
S3method("==",Schema)
S3method("==",Table)
S3method("[",RecordBatch)
S3method("[",Table)
S3method("[[",RecordBatch)
Expand Down
10 changes: 10 additions & 0 deletions r/R/table.R
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,17 @@ Table <- R6Class("Table", inherit = Object,
shared_ptr(Table, Table__select(self, indices))
}
},

Slice = function(offset, length = NULL) {
if (is.null(length)) {
shared_ptr(Table, Table__Slice1(self, offset))
} else {
shared_ptr(Table, Table__Slice2(self, offset, length))
}
},

Equals = function(other) {
Table__Equals(self, other)
}
),

Expand All @@ -141,6 +146,11 @@ Table <- R6Class("Table", inherit = Object,
)
)

#' @export
`==.Table` <- function(x, y) {
x$Equals(y)
}

Table$create <- function(..., schema = NULL){
dots <- list2(...)
# making sure there are always names
Expand Down

0 comments on commit d318a66

Please sign in to comment.