You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# What ??? :(
all.equal(arr_metadata, grp_metadata)
[1] "Attributes: < names for target but not for current >"
[2] "Attributes: < Length mismatch: comparison on first 0 components >"
[3] "Component \"a1\": Attributes: < target is NULL, current is list >"
[4] "Component \"b2\": Attributes: < target is NULL, current is list >"# OK
all.equal(arr_metadata, grp_metadata, check.attributes=FALSE)
[1] TRUE# Object structure
str(arr_metadata)
Listof2$a1:num1$b2:num2- attr(*, "class")=chr"tiledb_metadata"
str(grp_metadata)
Listof2$a1:num1..- attr(*, "key")=chr"a1"$b2:num2..- attr(*, "key")=chr"b2"# Print to consolearr_metadataa1:1b2:2grp_metadata$a1
[1] 1
attr(,"key")
[1] "a1"$b2
[1] 2
attr(,"key")
[1] "b2"
Comments/Notes/Fin
In practice, I do strip off the "key" attribute to get identical output structure which also helps in unit testing or mixing array and group metadata for whatever reason.
Other notes and observations:
The equivalent function of tiledb_group_get_metadata_from_index() for array is not implemented in R but exists in C++ (tiledb:::libtiledb_array_get_metadata_from_index())
tiledb_group_get_all_metadata() is written in R whereas tiledb_get_all_metadata() in C++ (loop under the hood), see libtiledb_array_get_metadata_list; not an issue other than memory efficiency but the implementation will be identical if you write it in C++ e.g., libtiledb_group_get_metadata_list.
Metadata related functions perhaps should get a roxygen tag @family metadata that will make it easier to navigate the vast documentation via See also auto generated links.
Not vacuum/consolidation operations for group metadata
I hope the above were helpful towards a consistent metadata interface (structure, class, print method, functionality) :) .
Thanks
The text was updated successfully, but these errors were encountered:
Issue
Putting the same metadata on an array and group and then retrieving them back to
R
, the returning objects are equivalent but not identical.For the case of retrieving all metadata :
tiledb_metadata
(used for print method)"key"
Is it intentional? I found no documentation or usage why the group metadata require an extra attribute on each element.
Here's a reproducible example:
R Code - reprex
Results
Comments/Notes/Fin
In practice, I do strip off the "key" attribute to get identical output structure which also helps in unit testing or mixing array and group metadata for whatever reason.
Other notes and observations:
The equivalent function of
tiledb_group_get_metadata_from_index()
for array is not implemented inR
but exists inC++
(tiledb:::libtiledb_array_get_metadata_from_index()
)tiledb_group_get_all_metadata()
is written inR
whereastiledb_get_all_metadata()
in C++ (loop under the hood), seelibtiledb_array_get_metadata_list
; not an issue other than memory efficiency but the implementation will be identical if you write it in C++ e.g.,libtiledb_group_get_metadata_list
.Metadata related functions perhaps should get a roxygen tag
@family metadata
that will make it easier to navigate the vast documentation viaSee also
auto generated links.Not vacuum/consolidation operations for group metadata
I hope the above were helpful towards a consistent metadata interface (structure, class, print method, functionality) :) .
Thanks
The text was updated successfully, but these errors were encountered: