[c++] Expose custom DataFrame domain for libtiledbsoma unit-test cases#3069
[c++] Expose custom DataFrame domain for libtiledbsoma unit-test cases#3069
DataFrame domain for libtiledbsoma unit-test cases#3069Conversation
libtiledbsoma unit-test casesDataFrame domain for libtiledbsoma unit-test cases
DataFrame domain for libtiledbsoma unit-test casesDataFrame domain for libtiledbsoma unit-test cases [WIP]
470c088 to
5321e89
Compare
9574fe7 to
e614221
Compare
DataFrame domain for libtiledbsoma unit-test cases [WIP]DataFrame domain for libtiledbsoma unit-test cases
a2bb0d0 to
cff1925
Compare
e614221 to
bcc51f3
Compare
cff1925 to
d66d775
Compare
235e699 to
74c7f15
Compare
d66d775 to
a3bf767
Compare
74c7f15 to
be66574
Compare
| arrow_table, column_index, 2); | ||
|
|
||
| return get_array_non_string_column<T>(child_array); | ||
| } |
There was a problem hiding this comment.
Could overload get_table_non_string_column but also fine as is.
template <typename T>
static std::vector<T> get_table_non_string_column(
const ArrowTable& arrow_table, const std::string& column_name);
template <typename T>
static std::vector<T> get_table_non_string_column(
const ArrowTable& arrow_table, int64_t column_index);
There was a problem hiding this comment.
Could overload get_table_non_string_column but also fine as is.
I should leave a comment
Originally I used template specialization
template <typename T>
foo(T a, T b) ...
template <>
foo(std::string a, std::string b) ...
and I kept getting spots where the non-string version was getting called even in string contexts
I tried to be clever & I persisted, but, ultimately I decided it wasn't worth it. I've been doing C/C++ a long time, I'm no slouch, and if it was fragile for me, it's not worth leaving in a fragile state.
So I went with the _string suffix, and the
if (std::is_same_v<T, std::string>) {
throw std::runtime_error(...)
}
be66574 to
a40f130
Compare
…l-data/TileDB-SOMA into kerl/cpp-sdf-domain-at-create
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3069 +/- ##
==========================================
+ Coverage 89.79% 89.94% +0.14%
==========================================
Files 41 41
Lines 4107 4107
==========================================
+ Hits 3688 3694 +6
+ Misses 419 413 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Issue and/or context: As tracked on issue #2407 / [sc-51048].
Note that the intended Python and R API changes are all agreed on and finalized as described in #2407.
Changes:
While working on R-level #3032 I realized to my unpleasant surprise that I'd neither tested nor implemented custom domain-setting for
SOMADataFrameat the C++ level. This PR fixes that oversight.Along the way I split out a necessary helper function in
ArrowAdapter, and changed some method names to make them clearer. I'm happy to do this as split-out commits or split-out PRs if that makes it easier to review.Notes for Reviewer: