Use consistent types with fwriteMainArgs.nrow.#4213
Merged
mattdowle merged 1 commit intoRdatatable:masterfrom Feb 16, 2020
Merged
Use consistent types with fwriteMainArgs.nrow.#4213mattdowle merged 1 commit intoRdatatable:masterfrom
mattdowle merged 1 commit intoRdatatable:masterfrom
Conversation
On armv7hl, test 1737.5 fails due to garbage in the column length mismatch error message. This is because the message tries to format `args.nrow` (an `int64_t`) using `%d` (i.e., `int`). Strangely, this does not fail on any other architectures, but this is likely a fluke. In all the other formatting calls, remove the unnecessary `(int64_t)` type cast, since `fwriteMainArgs.nargs` already is one.
Codecov Report
@@ Coverage Diff @@
## master #4213 +/- ##
=======================================
Coverage 99.61% 99.61%
=======================================
Files 72 72
Lines 13871 13871
=======================================
Hits 13817 13817
Misses 54 54
Continue to review full report at Codecov.
|
mattdowle
reviewed
Feb 16, 2020
| int max=0; | ||
| SEXP last=NULL; | ||
| for (int i=0; i<n; ++i) { | ||
| for (int64_t i=0; i<n; ++i) { |
mattdowle
reviewed
Feb 16, 2020
| for (int j=0; j<args.ncol; j++) { | ||
| SEXP column = VECTOR_ELT(DFcoerced, j); | ||
| if (args.nrow != length(column)) | ||
| error(_("Column %d's length (%d) is not the same as column 1's length (%d)"), j+1, length(column), args.nrow); |
Member
There was a problem hiding this comment.
Great spot too. Yes this would cause that strange number in the error message.
Member
|
Thanks for debugging these issues! I've invited you to be project member. Please accept the invitation button in your GitHub profile or projects page. I'll add you to DESCRIPTION too. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On armv7hl, test 1737.5 fails due to garbage in the column length mismatch error message. This is because the message tries to format
args.nrow(anint64_t) using%d(i.e.,int). Strangely, this does not fail on any other architectures, but this is likely a fluke.In all the other formatting calls, remove the unnecessary
(int64_t)type cast, sincefwriteMainArgs.nargsalready is one.See #3492.