Skip to content

Commit 56f143f

Browse files
committed
Fixes R CMD checks
1 parent 96a3985 commit 56f143f

15 files changed

Lines changed: 62 additions & 32 deletions

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Authors@R:
66
Description: Provides an R interface to Delta Lake via the delta-rs Rust library.
77
Enables reading and writing Delta Lake tables with full ACID transaction support,
88
time travel, and schema evolution capabilities.
9-
License: Apache License (>= 2)
9+
License: Apache License (>= 2) + file LICENSE
1010
Encoding: UTF-8
1111
Roxygen: list(markdown = TRUE)
1212
RoxygenNote: 7.3.2

NAMESPACE

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,15 @@ S3method("$",DeltaTableInternal)
44
S3method("[[",DeltaTableInternal)
55
export(DeltaTable)
66
export(create_deltalake)
7-
export(delta_create)
87
export(delta_table)
9-
export(delta_table_open)
10-
export(delta_write)
118
export(get_files)
129
export(get_metadata)
1310
export(get_schema)
1411
export(history)
15-
export(is_delta_table)
1612
export(is_delta_table_path)
1713
export(load_datetime)
1814
export(load_version)
1915
export(partition_columns)
20-
export(register_cloud_handlers)
2116
export(table_version)
2217
export(vacuum)
2318
export(write_deltalake)

R/delta_table.R

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ delta_table <- function(
9393
#' Get the current version of a Delta table
9494
#'
9595
#' @param table A DeltaTable object.
96-
#' @param ... Additional arguments (unused).
96+
#' @param ... Additional arguments passed to methods.
9797
#'
9898
#' @return Integer. The current version number.
9999
#'
@@ -118,6 +118,7 @@ method(table_version, DeltaTable) <- function(table, ...) {
118118
#' arrow, polars, or duckdb for reading.
119119
#'
120120
#' @param table A DeltaTable object.
121+
#' @param ... Additional arguments passed to methods.
121122
#'
122123
#' @return Character vector of file URIs.
123124
#'
@@ -150,6 +151,7 @@ method(get_files, DeltaTable) <- function(table) {
150151
#' partition columns, and configuration.
151152
#'
152153
#' @param table A DeltaTable object.
154+
#' @param ... Additional arguments passed to methods.
153155
#'
154156
#' @return A named list with table metadata.
155157
#'
@@ -172,6 +174,7 @@ method(get_metadata, DeltaTable) <- function(table) {
172174
#' Returns the Arrow schema of the Delta table.
173175
#'
174176
#' @param table A DeltaTable object.
177+
#' @param ... Additional arguments passed to methods.
175178
#'
176179
#' @return An Arrow Schema object.
177180
#'
@@ -199,7 +202,7 @@ method(get_schema, DeltaTable) <- function(table) {
199202
#' @return A data.frame with columns: version, timestamp, operation, user_id, user_name.
200203
#'
201204
#' @export
202-
history <- new_generic("history", "table", function(table, ...) {
205+
history <- new_generic("history", "table", function(table, ..., limit = NULL) {
203206
S7::S7_dispatch()
204207
})
205208

@@ -217,6 +220,7 @@ method(history, DeltaTable) <- function(table, ..., limit = NULL) {
217220
#' Returns the partition columns of the Delta table.
218221
#'
219222
#' @param table A DeltaTable object.
223+
#' @param ... Additional arguments passed to methods.
220224
#'
221225
#' @return Character vector of partition column names.
222226
#'
@@ -244,6 +248,7 @@ method(partition_columns, DeltaTable) <- function(table) {
244248
#' the retention threshold.
245249
#'
246250
#' @param table A DeltaTable object.
251+
#' @param ... Additional arguments passed to methods.
247252
#' @param retention_hours Numeric. Files older than this will be removed.
248253
#' Default is 168 hours (7 days).
249254
#' @param dry_run Logical. If TRUE, only list files that would be removed.
@@ -253,9 +258,19 @@ method(partition_columns, DeltaTable) <- function(table) {
253258
#' @return Character vector of files that were (or would be) removed.
254259
#'
255260
#' @export
256-
vacuum <- new_generic("vacuum", "table", function(table, ...) {
257-
S7::S7_dispatch()
258-
})
261+
vacuum <- new_generic(
262+
"vacuum",
263+
"table",
264+
function(
265+
table,
266+
...,
267+
retention_hours = NULL,
268+
dry_run = TRUE,
269+
enforce_retention_duration = TRUE
270+
) {
271+
S7::S7_dispatch()
272+
}
273+
)
259274

260275
#' @export
261276
method(vacuum, DeltaTable) <- function(
@@ -281,14 +296,19 @@ method(vacuum, DeltaTable) <- function(
281296
#' Updates the DeltaTable to point to a specific version.
282297
#'
283298
#' @param table A DeltaTable object.
299+
#' @param ... Additional arguments passed to methods.
284300
#' @param version Integer. The version number to load.
285301
#'
286302
#' @return The DeltaTable object (invisibly), updated to the specified version.
287303
#'
288304
#' @export
289-
load_version <- new_generic("load_version", "table", function(table, ...) {
290-
S7::S7_dispatch()
291-
})
305+
load_version <- new_generic(
306+
"load_version",
307+
"table",
308+
function(table, ..., version) {
309+
S7::S7_dispatch()
310+
}
311+
)
292312

293313
#' @export
294314
method(load_version, DeltaTable) <- function(table, ..., version) {
@@ -304,14 +324,19 @@ method(load_version, DeltaTable) <- function(table, ..., version) {
304324
#' Updates the DeltaTable to the version that was active at the specified time.
305325
#'
306326
#' @param table A DeltaTable object.
327+
#' @param ... Additional arguments passed to methods.
307328
#' @param datetime Character. ISO 8601 formatted datetime string.
308329
#'
309330
#' @return The DeltaTable object (invisibly), updated to the specified time.
310331
#'
311332
#' @export
312-
load_datetime <- new_generic("load_datetime", "table", function(table, ...) {
313-
S7::S7_dispatch()
314-
})
333+
load_datetime <- new_generic(
334+
"load_datetime",
335+
"table",
336+
function(table, ..., datetime) {
337+
S7::S7_dispatch()
338+
}
339+
)
315340

316341
#' @export
317342
method(load_datetime, DeltaTable) <- function(table, ..., datetime) {

R/extendr-wrappers.R

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,12 @@ NULL
1212

1313
#' Register cloud storage handlers (GCS, S3, Azure) for deltalake
1414
#' Called from R's .onLoad to enable cloud storage support
15-
#' @export
1615
register_cloud_handlers <- function() invisible(.Call(wrap__register_cloud_handlers))
1716

1817
#' Open a Delta Table at the specified path
19-
#' @export
2018
delta_table_open <- function(path, storage_options) .Call(wrap__delta_table_open, path, storage_options)
2119

2220
#' Check if a path is a Delta Table
23-
#' @export
2421
is_delta_table <- function(path, storage_options) .Call(wrap__is_delta_table, path, storage_options)
2522

2623
#' Write data to a Delta Lake table using WriteBuilder and LogicalPlan
@@ -40,7 +37,6 @@ is_delta_table <- function(path, storage_options) .Call(wrap__is_delta_table, pa
4037
#' @param storage_options Storage backend options (optional)
4138
#' @param schema_mode How to handle schema evolution: "overwrite" or "merge" (optional)
4239
#' @param target_file_size Target file size in bytes (optional)
43-
#' @export
4440
delta_write <- function(table_uri, stream, mode, partition_by, name, description, storage_options, schema_mode, target_file_size) .Call(wrap__delta_write, table_uri, stream, mode, partition_by, name, description, storage_options, schema_mode, target_file_size)
4541

4642
#' Create a new empty Delta Lake table
@@ -52,7 +48,6 @@ delta_write <- function(table_uri, stream, mode, partition_by, name, description
5248
#' @param description Table description (optional)
5349
#' @param storage_options Storage backend options (optional)
5450
#' @param configuration Table configuration properties (optional)
55-
#' @export
5651
delta_create <- function(table_uri, schema, partition_by, name, description, storage_options, configuration) .Call(wrap__delta_create, table_uri, schema, partition_by, name, description, storage_options, configuration)
5752

5853
DeltaTableInternal <- new.env(parent = emptyenv())

man/get_files.Rd

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/get_metadata.Rd

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/get_schema.Rd

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/history.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/load_datetime.Rd

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/load_version.Rd

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)