Skip to content

Commit

Permalink
R-side iteration [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkerl committed Oct 2, 2024
1 parent 524b761 commit 262b8e4
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions apis/r/R/SOMADataFrame.R
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,18 @@ SOMADataFrame <- R6::R6Class(
)
}

# * drop_cols: attr_name
# * add_attrs: attr_name -> Arrow type string for the index
# type, e.g. 'c' for int8
# * add_enmrs: attr_name -> pair of:
# o Arrow type string the value type, e.g. "f" or "U"
# o bool ordered

drop_cols_for_clib <- drop_cols
add_cols_index_types_for_clib <- list()
add_cols_value_types_for_clib <- list()
add_cols_ordered_for_clib <- list()

# Add columns
for (add_col in add_cols) {
spdl::debug("[SOMADataFrame update]: adding column '{}'", add_col)
Expand All @@ -333,18 +345,10 @@ SOMADataFrame <- R6::R6Class(
tiledb_create_options = tiledb_create_options
)

cat("\n\n")
cat("ADD COL NAME\n")
cat(add_col)
cat("ADD COL TYPE\n")
print(col_type)
cat("\n\n")
browser()

if (inherits(col_type, "DictionaryType")) {
spdl::debug(
"[SOMADataFrame update]: adding column '{}' as an enumerated type",
add_col
"[SOMADataFrame update]: adding enum column '{}' index type '{}' value type '{}' ordered {}",
add_col, col_type$index_type$name, col_type$value_type$name, col_type$ordered
)
se <- tiledb::tiledb_array_schema_evolution_add_enumeration(
object = se,
Expand Down

0 comments on commit 262b8e4

Please sign in to comment.