Skip to content

array_vacuum() with timestamps sets consolidation timestamps #836

@cgiachalis

Description

@cgiachalis

array_vacuum() has optional arguments to set time stamps but these affect consolidation time stamps. See source code further below.

Note that sm.vacuum.timestamp_start and sm.vacuum.timestamp_end are not listed in Academy's consolidation-and-vacuuming neither are found looking at config params tiledb::config(tiledb::tiledb_get_context()); but it seems are being used in Python client here; also Python's consolidation definition erroneously defines vacuum timestamps here.

Lastly, checking config params at C++ docs, there is no definitions for sm.vacuum.mode, sm.vacuum.timestamp_start, sm.vacuum.timestamp_end here.

body(tiledb::array_vacuum)

{
    stopifnot(`Argument 'uri' must be character` = is.character(uri))
    if (is.null(cfg)) {
        cfg <- config(ctx)
    }
    if (!missing(start_time)) {
        stopifnot(`Argument 'start_time' must be datetime object` = inherits(start_time, 
            "POSIXt"))
        start_time_int64 <- bit64::as.integer64(as.numeric(start_time) * 
            1000)
        cfg["sm.consolidation.timestamp_start"] <- as.character(start_time_int64) # <-------------------- HERE
    }
    if (!missing(end_time)) {
        stopifnot(`Argument 'end_time' must be datetime object` = inherits(end_time, 
            "POSIXt"))
        end_time_int64 <- bit64::as.integer64(as.numeric(end_time) * 
            1000)
        cfg["sm.consolidation.timestamp_end"] <- as.character(end_time_int64) # <-------------------- HERE
    }
    ctx <- tiledb_ctx(cfg)
    libtiledb_array_vacuum(ctx = ctx@ptr, uri = uri, cfgptr = cfg@ptr)
}

TileDB-R/R/TileDBArray.R

Lines 1957 to 1966 in eeb685e

if (!missing(start_time)) {
stopifnot(`Argument 'start_time' must be datetime object` = inherits(start_time, "POSIXt"))
start_time_int64 <- bit64::as.integer64(as.numeric(start_time) * 1000)
cfg["sm.consolidation.timestamp_start"] <- as.character(start_time_int64)
}
if (!missing(end_time)) {
stopifnot(`Argument 'end_time' must be datetime object` = inherits(end_time, "POSIXt"))
end_time_int64 <- bit64::as.integer64(as.numeric(end_time) * 1000)
cfg["sm.consolidation.timestamp_end"] <- as.character(end_time_int64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions