-
Notifications
You must be signed in to change notification settings - Fork 36
Add ingestion of matrices #1150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Looking at R API issue... Fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
src/scan.cpp
Outdated
break; | ||
|
||
case RType::INTEGER64: //REALSXP | ||
AppendMatrixSegmentAtomic<int64_t, int64_t, RInteger64Type>(((int64_t *)DATAPTR(source_data)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be DATAPTR_RO()
here and elsewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Fixed.
src/utils.cpp
Outdated
@@ -111,6 +111,9 @@ static void AppendColumnSegment(SRC *source_data, Vector &result, idx_t count) { | |||
} | |||
|
|||
R_len_t RApiTypes::GetVecSize(RType rtype, SEXP coldata) { | |||
if (rtype.id() == RTypeId::MATRIX) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this check and the while
loop be swapped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
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
No description provided.