-
Notifications
You must be signed in to change notification settings - Fork 21
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
Added support for read_xport #50
Conversation
- C_interface.jl: Changed return type for readstat_get_row_count to Int (from UInt), as it seems that not all format contains nrows as metainformation and -1 is returned in those instances (xport is one of such formats). Added readstat_parse for type::Val{:xport}, calls readstat_parse_xport. - ReadStat.jl: Added constant READSTAT_NALLOC_ROWS: number of rows to allocate at the same time (see handle_variable! and handle_value!) Added read_xport and exported it. Modified read_data_file, handle_variable! and handle_value! to support formats without nrows metainformation. - Test Added test cases for xpt and types.xpt.
Cool, thanks! I was not aware that I'll try to fix the CI failures on |
Alrigh, #51 fixed the CI builds on |
I did not realize that push! would grow as needed, just started out with
Julia recently. I am also wondering if it is worth splitting up the code a
bit more and formats with nrows in the header, like the ones originally
implemented, would retain the original implementation, the fastest, and the
auto-growing (via push!) would only be used for formats without row count
information. Being a bit of a novice, I am tempted to take the approach to
making it type based used in other parts of the code, but I don't know if
there is a better way.
I will merge the new master into my branch and make some proposed changes
to address the points above.
…On Sun, Aug 25, 2019 at 1:24 AM David Anthoff ***@***.***> wrote:
Alrigh, #51 <#51> fixed the
CI builds on master. So if you merge master into your branch, you should
have a baseline that passes CI builds.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#50?email_source=notifications&email_token=AAOXKUPHVEK6JGYV6POGS6LQGIJP7A5CNFSM4IMSSSF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5CMSEA#issuecomment-524601616>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAOXKUJJIN6Z5BGSHDDPGETQGIJP7ANCNFSM4IMSSSFQ>
.
|
Yes, I think having a different code path for the case with known size and the case without would be good, we don't want to use |
Just following up here to see if there are plans to support |
I believe this is fully covered by #75, so closing this here. |
C_interface.jl:
Changed return type for readstat_get_row_count to Int (from UInt), as it seems that not all format contains nrows as metainformation and -1 is returned in those instances (xport is one of such formats).
Added readstat_parse for type::Val{:xport}, calls readstat_parse_xport.
ReadStat.jl:
Added constant READSTAT_NALLOC_ROWS: number of rows to allocate at the same time (see handle_variable! and handle_value!)
Added read_xport and exported it.
Modified read_data_file, handle_variable! and handle_value! to support formats without nrows metainformation.
Test
Added test cases for xpt and types.xpt.