File tree 1 file changed +7
-23
lines changed
1 file changed +7
-23
lines changed Original file line number Diff line number Diff line change @@ -327,30 +327,14 @@ create_and_populate_32bit_sparse_nd_array <- function(uri) {
327
327
soma_data = c(1L , 2L , 3L )
328
328
)
329
329
330
- tdb_dims <- mapply(
331
- tiledb :: tiledb_dim ,
332
- name = c(" soma_dim_0" , " soma_dim_1" ),
333
- MoreArgs = list (
334
- domain = c(bit64 :: as.integer64(0 ), 2 ^ 31 - 1 ),
335
- tile = bit64 :: as.integer64(2 ),
336
- type = " INT64"
337
- ),
338
- SIMPLIFY = FALSE
339
- )
340
-
341
- tdb_attr <- tiledb :: tiledb_attr(
342
- name = " soma_data" ,
343
- type = " INT32" ,
330
+ arr <- SOMASparseNDArrayCreate(
331
+ uri = uri ,
332
+ type = arrow :: int32(),
333
+ shape = rep_len(2 ^ 31 , length.out = 2L )
344
334
)
335
+ on.exit(arr $ close(), add = TRUE , after = FALSE )
345
336
346
- tdb_schema <- tiledb :: tiledb_array_schema(
347
- domain = tiledb :: tiledb_domain(tdb_dims ),
348
- attrs = tdb_attr ,
349
- sparse = TRUE
350
- )
337
+ arr $ .write_coordinates(df )
351
338
352
- tiledb :: tiledb_array_create(uri , schema = tdb_schema )
353
- arr <- tiledb :: tiledb_array(uri , " WRITE" )
354
- arr [] <- df
355
- uri
339
+ return (uri )
356
340
}
You can’t perform that action at this time.
0 commit comments