kshedden / datareader

Read binary SAS (SAS7BDAT) and Stata (dta) files in the Go (Golang) programming language. Also provides command line tools for working with these file formats.
BSD 3-Clause "New" or "Revised" License
23 stars 12 forks source link

First few rows of Data() method has wrong offset #13

Closed gmeixiong closed 5 years ago

gmeixiong commented 5 years ago

I am reading a sas7bdat file that represents a table with ~15K rows. The reader gives the correct column formats, names, and labels. For the data itself, the first 18 rows are incorrect in that columns have incorrect offsets while the rest is correct.

kshedden commented 5 years ago

Can you temporarily revert to a commit prior to the latest round of refactorings, like the one below, to see if the issue is still there?

git checkout 9e40802560154014af1c275527b25b0499fe9630

On Mon, Sep 30, 2019, 18:51 gerry meixiong notifications@github.com wrote:

I am reading a sas7bdat file that represents a table with ~15K rows. The reader gives the correct column formats, names, and labels. For the data itself, the first 18 rows are incorrect in that columns have incorrect offsets while the rest is correct.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kshedden/datareader/issues/13?email_source=notifications&email_token=AAULBQ72BSGUMPJUNU7NDWDQMJ7G3A5CNFSM4I4BVJ32YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HOWBEIA, or mute the thread https://github.com/notifications/unsubscribe-auth/AAULBQ2FEG7VCAHNSKX4FKTQMJ7G3ANCNFSM4I4BVJ3Q .

gmeixiong commented 5 years ago

Hmmm even with the code at that commit, the error persists. I'm trying to fix it on my end.

gmeixiong commented 5 years ago

Still working on finding the root cause.

I've discovered that it only affects the first page which is a "mix" page. All the following pages are "data" pages and have correct data.

kshedden commented 5 years ago

Closed by #16, but eventually there should be a more elegant solution. We currently do not have any test files that require NoAligmentCorrection to be set to true.