-
Notifications
You must be signed in to change notification settings - Fork 29
add capability and option flag to treat int96 as a timestamp #162
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
Conversation
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.
Tests may not pull from real endpoints. The functional changes look good though, thank you.
| this.timeout(30000); // Increase timeout for URL fetching | ||
|
|
||
| const testUrl = | ||
| 'https://aws-public-blockchain.s3.us-east-2.amazonaws.com/v1.0/eth/traces/date%3D2016-05-22/part-00000-54f4b70c-db10-479c-a117-e3cc760a7e26-c000.snappy.parquet'; |
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.
Please change this to read in a small reference file (<10-20kb) that is checked into test/test-files, with or without an S3 mock client as in test/reader.js
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.
yeah.. i don't have this. i have that file. thousands of them, actually. 🙃
but, on the bright side, at least i wrote tests this time! 😄
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.
well, if you can truncate one of your files and check it into the PR that'd be much appreciated. if that's not possible let us know.
Head branch was pushed to by a user without write access
shannonwells
left a comment
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.
We need this change so I'm approving and will set an issue to add a small test file.
Problem
There's currently no way to handle INT96 timestamps.
Closes #158
Solution
add a flag to enable treating all INT96 fields in a file as timestamps.
Change summary:
Steps to Verify:
npm test -- -g "INT96 timestamp handling"INT96 timestamp handling ✔ should handle INT96 values as numbers by default (4593ms) block_timestamp timestamp: 2016-05-22T08:22:02.000Z last_modified timestamp: 2022-09-12T01:05:04.629Z ✔ should convert INT96 values to timestamps when option is enabled (3125ms)