feat: Add ingestion of matrices - #1150
Conversation
|
Looking at R API issue... Fixed. |
krlmlr
left a comment
There was a problem hiding this comment.
Thanks. Is there a good way to make this feature opt-in, based on ConvertOpts ?
I see this adds some support for complex numbers. Could this have been a separate PR? Same question regarding opt-in behavior.
| break; | ||
|
|
||
| case RType::INTEGER64: //REALSXP | ||
| AppendMatrixSegmentAtomic<int64_t, int64_t, RInteger64Type>(((int64_t *)DATAPTR(source_data)), |
There was a problem hiding this comment.
Should this be DATAPTR_RO() here and elsewhere?
| } | ||
|
|
||
| R_len_t RApiTypes::GetVecSize(RType rtype, SEXP coldata) { | ||
| if (rtype.id() == RTypeId::MATRIX) { |
There was a problem hiding this comment.
Should this check and the while loop be swapped?
There was a problem hiding this comment.
Sure, I can swap them. You mean that if I have a matrix inside a structure it would work better? Not sure if I've thought about that case... Is that a case we want to support?
There was a problem hiding this comment.
For completeness and accuracy, yes. Not that I expect it to occur; if it does nevertheless, we'll save a lot of time later by doing a small step now.
f91148d to
2b6bf5b
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1150 +/- ##
===========================================
- Coverage 63.61% 52.62% -10.99%
===========================================
Files 123 146 +23
Lines 5266 10025 +4759
===========================================
+ Hits 3350 5276 +1926
- Misses 1916 4749 +2833 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No, I don't think so. Here is why. If the user gives me a matrix I only have two options. Either reject it as "I don't know what to do with a matrix" or slice up the matrix into arrays and push that into the database. The intent is clear from the user - he/she is giving me a matrix and there is only one constructive thing I can do with it. If the user had given me lists instead it would have been different. In that case I would have to know what to do with them, either create lists or arrays in the database. In that case the user would have to give me additional direction through options.
I added support so I can generate an error message saying that complex numbers are not supported. I could do it in a different way by looking at the SEXP type instead if that works better for you. It would break the pattern in scan.cpp though — look a little bit as a quick-and-dirty. |
2b6bf5b to
f8fd4e7
Compare
|
The Ubuntu-22.04 (4.2) check fails. Seems like the snapshot files didn't make it across to Ubuntu. Can I ask you to manually rerun the test? UPDATE: After triggering a few reruns (using dummy changes) the tests are now passing. |
3b2b940 to
4bf92f4
Compare
4bf92f4 to
a2b189e
Compare
3e5d5fa to
f344576
Compare
|
Thanks! |
No description provided.